/* Critical inline styles extracted from dashboard.html */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #fff;
  font-family: 'Inter', sans-serif;
}

.modal-content.billing-modal,
.modal-content.account-modal {
  max-width: 720px;
  background: rgba(8, 10, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.modal-content.billing-modal h3,
.modal-content.account-modal h3 {
  font-size: 1.6rem;
}

.billing-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .billing-modal-grid {
    flex-direction: row;
  }
}

.billing-card,
.billing-help-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.25rem;
}

.billing-plan-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.billing-plan-name {
  font-size: 1.35rem;
  font-weight: 600;
}

.billing-plan-meta,
.billing-plan-status,
.billing-plan-renewal {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.billing-plan-status {
  text-transform: capitalize;
}

.billing-plan-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.billing-metric {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.billing-metric span {
  display: block;
}

.billing-metric-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.billing-metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.billing-plan-features {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
  margin-bottom: 1rem;
}

.billing-plan-features ul {
  margin: 0;
  padding: 0;
}

.billing-plan-features li {
  list-style: none;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
}

.billing-plan-features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: #ff89f0;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.billing-plan-price {
  text-align: right;
}

.billing-plan-amount {
  font-size: 1.9rem;
  font-weight: 700;
}

.billing-plan-price-note {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.billing-button,
.account-action {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

.billing-button {
  background: linear-gradient(135deg, #7f7cff, #6de1ff);
  color: #05060f;
}

.billing-button--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.billing-status {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  min-height: 1.2rem;
}

.billing-help-card ul {
  margin-top: 0.75rem;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.78);
}

.account-warning {
  background: rgba(255, 99, 132, 0.12);
  border: 1px solid rgba(255, 99, 132, 0.4);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.account-list {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.account-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.account-action.primary {
  background: linear-gradient(135deg, #ff6b6b, #ff3b3b);
  color: #fff;
}

.account-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.account-modal-head {
  margin-bottom: 1.5rem;
}

.account-modal-head p {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.35rem;
}

.account-modal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.account-card {
  flex: 1 1 280px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem;
}

.account-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.settings-checkbox {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  accent-color: #7f7cff;
  flex-shrink: 0;
}

.settings-checkbox .checkbox-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.settings-checkbox .checkbox-copy {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.account-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.account-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-outline {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.account-form label {
  display: block;
  margin-bottom: 1rem;
}

.account-form span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.35rem;
}

.account-form input,
.account-form textarea,
.account-form select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.account-form select option {
  color: #05060f;
  background: #fff;
}

.account-form textarea {
  min-height: 100px;
  resize: vertical;
}

.account-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 1rem 0 1.5rem;
}

.danger-card {
  background: rgba(255, 99, 132, 0.12);
  border: 1px solid rgba(255, 99, 132, 0.3);
}

.account-help {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.4rem;
}

.account-phone-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.35rem;
}

.personalization-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  margin: 2rem auto 1.5rem;
  width: min(700px, 100%);
}

.personalization-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.personalization-banner button {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ff89f0, #7f7cff);
  color: #05060f;
  cursor: pointer;
}

.personalization-banner[hidden] {
  display: none;
}

.personalization-banner .banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-save {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ff89f0, #7f7cff);
  color: #05060f;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-save:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-save--success {
  background: rgba(16, 185, 129, 0.15);
  color: #22d3a6;
  box-shadow: 0 0 0 1px rgba(34, 211, 166, 0.35) inset;
}

/* Settings Modal - Location Grid */
.location-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.75rem;
  max-width: 100%;
  overflow: hidden;
}

.location-grid label {
  min-width: 0;
}

.location-grid input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .location-grid {
    grid-template-columns: 1fr 1fr;
  }
  .location-grid label:first-child {
    grid-column: 1 / -1;
  }
}

/* Settings Modal responsive */
.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Prevent overflow in forms */
.modal-content form,
.modal-content div[style*="background"] {
  max-width: 100%;
  overflow: hidden;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.modal-content label {
  min-width: 0;
  max-width: 100%;
}

/* ============================================
   MOBILE RESPONSIVE FIXES FOR MODALS
   ============================================ */

/* Settings Modal - Identity grids */
.settings-identity-grid,
.settings-identity-grid-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .settings-identity-grid,
  .settings-identity-grid-alt {
    grid-template-columns: 1fr;
  }
}

/* Account Modal - Profile Photos Grid */
.account-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 520px) {
  .account-photos-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Account Modal - Avatar item layout */
.account-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  min-width: 0;
  max-width: 100%;
}

.account-avatar-item img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.account-avatar-item .avatar-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.account-avatar-item .avatar-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
}

.account-avatar-item .avatar-actions button {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  max-width: 80px;
}

@media (max-width: 400px) {
  .account-avatar-item .avatar-actions {
    flex-direction: column;
    align-items: center;
  }
  .account-avatar-item .avatar-actions button {
    max-width: 100%;
    width: 100%;
  }
}

/* Account Modal - Details Grid */
.account-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .account-details-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MOBILE MODAL FIXES - iOS Safe Area + Bottom Nav
   ============================================ */

/* Fix modal overlay to account for iOS safe areas */
@media (max-width: 768px) {
  .modal-overlay {
    padding: env(safe-area-inset-top, 12px) env(safe-area-inset-right, 12px) env(safe-area-inset-bottom, 12px) env(safe-area-inset-left, 12px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); /* Extra space for browser nav */
  }

  .modal-content {
    max-height: calc(100vh - env(safe-area-inset-top, 20px) - env(safe-area-inset-bottom, 20px) - 100px);
    max-height: calc(100dvh - env(safe-area-inset-top, 20px) - env(safe-area-inset-bottom, 20px) - 100px);
    margin: 0;
    border-radius: 20px;
    padding: 1.25rem;
    padding-top: 3rem; /* Space for close button */
    padding-bottom: 1.5rem;
  }

  /* Ensure close button is always visible and tappable */
  .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.75rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Modal footer should be sticky at bottom with proper spacing */
  .modal-footer,
  .modal-footer--stack {
    position: sticky;
    bottom: 0;
    background: inherit;
    padding-top: 1rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    margin-top: 1rem;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Ensure buttons in footer are large enough to tap */
  .modal-footer button,
  .modal-footer--stack button,
  .btn-save,
  .btn-cancel,
  .btn-save--full,
  .btn-cancel--full {
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Extra small screens (iPhone SE, small Android) */
@media (max-width: 380px) {
  .modal-content {
    padding: 1rem;
    padding-top: 2.75rem;
    border-radius: 16px;
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
  }

  .modal-close {
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 1.5rem;
  }

  .modal-footer,
  .modal-footer--stack {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Billing modal specific fixes */
  .billing-modal .billing-plan-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .billing-modal .billing-plan-price {
    text-align: left;
  }

  .billing-modal .billing-plan-amount {
    font-size: 1.5rem;
  }
}

/* Landscape mode on mobile - reduce height further */
@media (max-height: 500px) and (max-width: 900px) {
  .modal-content {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 0.75rem;
    padding-top: 2.5rem;
  }

  .modal-close {
    top: 4px;
    right: 4px;
  }
}

/* ============================================
   BILLING MODAL - NEW UI RESPONSIVE STYLES
   ============================================ */

/* Base billing button styles (ensure they work on all sizes) */
.billing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  background: linear-gradient(135deg, #7f7cff, #6de1ff);
  color: #05060f;
  min-height: 44px; /* Minimum touch target */
}

.billing-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(127, 124, 255, 0.3);
}

.billing-button:active {
  transform: translateY(0);
}

.billing-button--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.billing-button--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.billing-button[data-loading="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Tablet and up - upgrade cards side by side */
@media (min-width: 520px) {
  .billing-modal #billingContent {
    padding: 1.5rem;
  }
}

/* Mobile - stack everything vertically */
@media (max-width: 519px) {
  /* Plan header: stack price below name on mobile */
  .billing-modal #billingContent > div:first-child {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .billing-modal #billingContent > div:first-child > div:last-child {
    text-align: left !important;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }

  .billing-modal #billingContent > div:first-child > div:last-child p:first-child {
    font-size: 1.5rem !important;
  }

  /* Usage stats: 2 columns on mobile instead of 3 */
  .billing-modal #billingContent > div:nth-child(2) {
    grid-template-columns: 1fr 1fr !important;
  }

  /* If there's a third stat (today), let it span full width */
  .billing-modal #billingContent > div:nth-child(2) > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  /* Upgrade cards: stack vertically */
  .billing-modal #billingContent div[style*="display: flex"][style*="gap: 12px"] {
    flex-direction: column !important;
  }

  /* Make upgrade card buttons full width */
  .billing-modal #billingContent div[style*="min-width: 200px"] {
    min-width: 100% !important;
  }

  /* Features list: slightly smaller text */
  .billing-modal #billingContent ul li {
    font-size: 0.9rem;
  }

  /* Exclusive tags: smaller on mobile */
  .billing-modal #billingContent span[style*="SOULMATE"] {
    font-size: 0.6rem !important;
    padding: 2px 5px !important;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .billing-modal #billingContent {
    padding: 1rem !important;
  }

  /* Even smaller plan name */
  .billing-modal #billingContent > div:first-child span[style*="font-size: 1.5rem"] {
    font-size: 1.25rem !important;
  }

  /* Smaller usage stat values */
  .billing-modal #billingContent > div:nth-child(2) p[style*="font-size: 1.1rem"] {
    font-size: 1rem !important;
  }

  /* Smaller upgrade card prices */
  .billing-modal #billingContent span[style*="font-size: 1.4rem"] {
    font-size: 1.2rem !important;
  }
}

/* Desktop enhancements */
@media (min-width: 640px) {
  .billing-modal {
    max-width: 680px !important;
  }

  /* Upgrade cards: ensure they're equal width */
  .billing-modal #billingContent div[style*="display: flex"][style*="gap: 12px"] > div {
    flex: 1;
    min-width: 0;
  }
}

/* ============================================
   GLASSMORPHIC MODAL DESIGN SYSTEM
   Based on 2025 Dark Glassmorphism trends
   ============================================ */

/* Glass card - the foundation for all sections */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.glass-card:last-child {
  margin-bottom: 0;
}

/* Card title - unified style */
.glass-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-card__title span {
  font-size: 1rem;
  opacity: 0.8;
}

/* Feature grid - MUST include display: grid */
.glass-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.glass-feature-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.glass-feature-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* Telegram accent - subtle blue glow */
.glass-feature-item--telegram {
  background: rgba(42, 171, 238, 0.08);
  border-color: rgba(42, 171, 238, 0.15);
}

.glass-feature-item--telegram:hover {
  background: rgba(42, 171, 238, 0.12);
  box-shadow: 0 0 20px rgba(42, 171, 238, 0.1);
}

/* Input fields */
.glass-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.glass-input:focus {
  outline: none;
  border-color: rgba(144, 255, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(144, 255, 106, 0.1);
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Select dropdown - glass style */
.glass-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' fill-opacity='0.5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.glass-select option {
  background: #1a1a2e;
  color: #fff;
}

/* Plan cards with gradient glow */
.glass-plan-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.glass-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.glass-plan-card--featured {
  background: linear-gradient(135deg, rgba(144, 255, 106, 0.08) 0%, rgba(127, 223, 212, 0.04) 100%);
  border: 2px solid rgba(144, 255, 106, 0.3);
  box-shadow: 0 0 30px rgba(144, 255, 106, 0.1);
}

/* Danger zone - red glow effect */
.glass-card--danger {
  border-color: rgba(255, 107, 107, 0.25);
  box-shadow: inset 0 0 30px rgba(255, 107, 107, 0.03);
}

.glass-card--danger .glass-card__title {
  color: #FF6B6B;
}

/* Buttons - glass style */
.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.7rem 1.25rem;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.glass-btn--primary {
  background: linear-gradient(135deg, #90FF6A 0%, #7fdfd4 100%);
  border: none;
  color: #000;
  font-weight: 600;
}

.glass-btn--primary:hover {
  box-shadow: 0 4px 20px rgba(144, 255, 106, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .glass-card {
    padding: 1rem;
  }

  /* Footer scrolls with content on mobile */
  .modal-footer,
  .modal-footer--stack {
    position: relative !important;
    margin-top: 1.5rem;
    background: transparent !important;
  }
}

@media (max-width: 480px) {
  .glass-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   GUIDED SETUP WIZARD - GLASSMORPHISM
   ============================================ */
.guided-setup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 15, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.guided-setup-modal {
  width: 100%;
  max-width: 540px;
  background: rgba(20, 22, 35, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(102, 126, 234, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: wizardSlideIn 0.5s ease-out;
}

@keyframes wizardSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Animated gradient border */
.guided-setup-modal::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg,
    #667eea, #764ba2, #ff89f0, #5DE6FF, #667eea);
  background-size: 300% 300%;
  border-radius: 30px;
  z-index: -1;
  animation: gradientBorder 8s ease infinite;
  opacity: 0.6;
}

@keyframes gradientBorder {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Progress Bar */
.setup-progress {
  padding: 1.5rem 2rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.progress-step.completed {
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.progress-step.active {
  background: rgba(102, 126, 234, 0.3);
}

.progress-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 0.75rem;
  white-space: nowrap;
}

/* Step Container */
.setup-steps-container {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

.setup-step {
  position: absolute;
  inset: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(50px);
  pointer-events: none;
  transition: all 0.4s ease;
}

.setup-step.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.setup-step.prev {
  transform: translateX(-50px);
}

/* Step Icon */
.setup-step-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.setup-step-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.1));
}

.setup-step-icon i {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Icon variants */
.setup-step-icon.icon-user::before { background: linear-gradient(135deg, rgba(255, 137, 240, 0.2), rgba(255, 137, 240, 0.05)); }
.setup-step-icon.icon-user i { background: linear-gradient(135deg, #FF89F0, #ff5edc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.setup-step-icon.icon-time::before { background: linear-gradient(135deg, rgba(255, 184, 0, 0.2), rgba(255, 140, 0, 0.1)); }
.setup-step-icon.icon-time i { background: linear-gradient(135deg, #FFB800, #FF8C00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.setup-step-icon.icon-heart::before { background: linear-gradient(135deg, rgba(255, 107, 156, 0.2), rgba(255, 137, 240, 0.1)); }
.setup-step-icon.icon-heart i { background: linear-gradient(135deg, #FF6B9C, #FF89F0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.setup-step-icon.icon-magic::before { background: linear-gradient(135deg, rgba(93, 230, 255, 0.2), rgba(144, 255, 106, 0.1)); }
.setup-step-icon.icon-magic i { background: linear-gradient(135deg, #5DE6FF, #90FF6A); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.setup-step-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #fff;
}

.setup-step-title span {
  background: linear-gradient(90deg, #667eea, #764ba2, #ff89f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-step-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Form Elements */
.setup-form-group {
  margin-bottom: 1.25rem;
}

.setup-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.setup-form-group .required {
  color: #FF89F0;
  margin-left: 0.25rem;
}

.setup-input,
.setup-select {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.setup-input:focus,
.setup-select:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.setup-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.setup-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
}

.setup-select option {
  background: #1a1a2e;
  color: #fff;
}

.setup-form-helper {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setup-form-helper.highlight {
  color: #5DE6FF;
}

/* Companion Selection Cards */
.companion-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.companion-card {
  background: rgba(20, 22, 35, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.companion-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.companion-card.selected {
  border-color: #FF89F0;
  background: rgba(255, 137, 240, 0.1);
  box-shadow: 0 0 40px rgba(255, 137, 240, 0.2);
}

.companion-card.boyfriend.selected {
  border-color: #5DE6FF;
  background: rgba(93, 230, 255, 0.1);
  box-shadow: 0 0 40px rgba(93, 230, 255, 0.2);
}

.companion-card-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff89f0 0%, #7f7cff 100%);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
}

.companion-card.boyfriend .companion-card-check {
  background: linear-gradient(135deg, #5DE6FF 0%, #3498db 100%);
}

.companion-card.selected .companion-card-check {
  display: flex;
}

.companion-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(255, 137, 240, 0.3), rgba(255, 137, 240, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 3px solid rgba(255, 137, 240, 0.3);
}

.companion-avatar i {
  color: rgba(255, 137, 240, 0.8);
}

.companion-card.boyfriend .companion-avatar {
  background: linear-gradient(135deg, rgba(93, 230, 255, 0.3), rgba(93, 230, 255, 0.1));
  border-color: rgba(93, 230, 255, 0.3);
}

.companion-card.boyfriend .companion-avatar i {
  color: rgba(93, 230, 255, 0.8);
}

.companion-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.companion-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Name Chips */
.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.name-chip {
  padding: 0.6rem 1.1rem;
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s;
}

.name-chip:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.name-chip.selected {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.2));
  border-color: rgba(102, 126, 234, 0.5);
  color: #fff;
}

/* Timezone Examples */
.timezone-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.timezone-example {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.timezone-example i {
  font-size: 1.25rem;
}

.timezone-example .sun-icon {
  color: #FFB800;
}

.timezone-example .moon-icon {
  color: #764ba2;
}

.timezone-example .time {
  font-weight: 600;
  color: #FFB800;
}

/* Completion Step */
.completion-step {
  text-align: center;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  position: relative;
}

.success-icon-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(144, 255, 106, 0.2), rgba(102, 126, 234, 0.2));
  border-radius: 50%;
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.success-checkmark {
  width: 100%;
  height: 100%;
  position: relative;
}

.success-checkmark svg {
  width: 100%;
  height: 100%;
}

.success-checkmark .circle {
  fill: none;
  stroke: url(#successGradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawCircle 0.6s ease-out 0.2s forwards;
}

.success-checkmark .check {
  fill: none;
  stroke: url(#successGradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s ease-out 0.7s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.completion-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #90FF6A, #5DE6FF, #FF89F0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.completion-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.25rem;
}

.completion-summary {
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  overflow: visible;
}

.completion-greeting {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.completion-greeting .user-name {
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.completion-greeting .ai-name {
  background: linear-gradient(90deg, #FF89F0, #5DE6FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.completion-detail {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Feature Highlights */
.feature-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.feature-highlight {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-highlight:hover {
  transform: translateY(-2px);
}

.feature-highlight-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}

.feature-highlight-icon.chat {
  background: linear-gradient(135deg, rgba(93, 230, 255, 0.2), rgba(93, 230, 255, 0.05));
  color: #5DE6FF;
}

.feature-highlight-icon.voice {
  background: linear-gradient(135deg, rgba(144, 255, 106, 0.2), rgba(144, 255, 106, 0.05));
  color: #90FF6A;
}

.feature-highlight-icon.spicy {
  background: linear-gradient(135deg, rgba(255, 137, 240, 0.2), rgba(255, 137, 240, 0.05));
  color: #FF89F0;
}

.feature-highlight-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.feature-highlight-sublabel {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 137, 240, 0.8);
  margin-top: 0.25rem;
  text-transform: uppercase;
}

/* Navigation Buttons */
.setup-nav {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.setup-btn {
  padding: 0.9rem 1.75rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setup-btn-back {
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.setup-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.setup-btn-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  flex: 1;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.setup-btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.setup-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.setup-btn-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.setup-btn-skip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.setup-btn-start {
  background: linear-gradient(135deg, #ff89f0 0%, #7f7cff 100%);
  border: none;
  color: #fff;
  flex: 1;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(255, 137, 240, 0.3);
}

.setup-btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 137, 240, 0.5);
}

/* SOLM8 Logo */
.solm8-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

.solm8-logo.small {
  width: 80px;
  margin-bottom: 0.75rem;
}

.solm8-logo-wrapper {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Welcome Step */
.welcome-step {
  text-align: center;
}

.welcome-card {
  text-align: center;
  padding: 1.25rem;
  background: rgba(20, 22, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  max-width: 300px;
  margin: 1rem auto 0;
}

.welcome-heart {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.welcome-heart i {
  font-size: 3rem;
  background: linear-gradient(135deg, #FF89F0, #7f7cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.welcome-message {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin: 0;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1); }
  75% { transform: scale(1.05); }
}

/* ==============================================
   MOBILE - COMPLETELY REDESIGNED FOR NO CUTOFF
   ============================================== */
@media (max-width: 540px) {
  /* Full-screen overlay */
  .guided-setup-overlay {
    padding: 0;
    align-items: stretch;
  }

  /* Full-screen modal - flex column layout */
  .guided-setup-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Hide the animated border on mobile */
  .guided-setup-modal::before {
    display: none;
  }

  /* Minimal progress bar at top */
  .setup-progress {
    padding: 0.5rem 1rem;
    flex-shrink: 0;
    gap: 0.25rem;
  }

  .progress-step {
    height: 3px;
  }

  .progress-label {
    display: none; /* Hide step count on mobile */
  }

  /* Scrollable steps container - takes remaining space */
  .setup-steps-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  /* Each step: scrollable, centered content */
  .setup-step {
    position: absolute;
    inset: 0;
    padding: 0.75rem 1rem;
    padding-bottom: 0.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  /* Fixed navigation at bottom - ALWAYS VISIBLE */
  .setup-nav {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 12px));
    background: rgba(15, 17, 28, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
  }

  /* Side-by-side buttons */
  .setup-btn {
    padding: 0.7rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 10px;
    min-height: 44px;
  }

  .setup-btn-back {
    flex: 0 0 auto;
    padding: 0.7rem 0.9rem;
  }

  .setup-btn-next,
  .setup-btn-start {
    flex: 1;
  }

  /* HIDE SKIP BUTTON ON MOBILE */
  .setup-btn-skip {
    display: none !important;
  }

  /* ===== HIDE STEP ICONS ON MOBILE ===== */
  .step-icon,
  .setup-step-icon {
    display: none !important;
  }

  /* Titles - centered, compact */
  .step-title,
  .setup-step-title {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    text-align: center;
    width: 100%;
  }

  .step-subtitle,
  .setup-step-subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    line-height: 1.35;
    text-align: center;
    width: 100%;
    max-width: 280px;
  }

  /* Form inputs - full width */
  .setup-form-group {
    width: 100%;
    margin-bottom: 0.6rem;
  }

  .setup-form-group label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }

  .setup-input,
  .setup-select {
    padding: 0.65rem 0.85rem;
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 10px;
  }

  .form-helper,
  .setup-form-helper {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    text-align: center;
    justify-content: center;
  }

  /* ===== WELCOME STEP ===== */
  .welcome-step {
    justify-content: center;
    text-align: center;
    padding-top: 1.5rem !important;
  }

  .solm8-logo-wrapper {
    margin-bottom: 0.4rem;
  }

  .welcome-step .solm8-logo {
    width: 56px;
    margin-bottom: 0.3rem;
  }

  .welcome-card {
    padding: 0.65rem;
    margin: 0.4rem auto 0;
    max-width: 240px;
    border-radius: 12px;
  }

  .welcome-heart {
    margin-bottom: 0.2rem;
  }

  .welcome-heart i {
    font-size: 1.75rem;
  }

  .welcome-message {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  /* ===== COMPANION CARDS - Side by side ===== */
  .companion-cards {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
  }

  .companion-card {
    flex: 1;
    padding: 0.6rem 0.4rem;
    border-radius: 12px;
  }

  .companion-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
  }

  .companion-card h3 {
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
  }

  .companion-card p {
    font-size: 0.65rem;
  }

  .companion-card-check {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    top: 0.35rem;
    right: 0.35rem;
  }

  /* ===== NAME CHIPS ===== */
  .name-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    width: 100%;
  }

  .name-chip {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  /* ===== TIMEZONE ===== */
  .timezone-examples {
    display: none !important; /* Always hide on mobile */
  }

  .form-helper.highlight {
    display: none; /* Hide the extra helper on mobile */
  }

  /* ===== COMPLETION STEP - COMPACT, NO CHECKMARK ===== */
  .completion-step {
    justify-content: center;
    padding: 1rem !important;
    text-align: center;
  }

  .completion-step .solm8-logo-wrapper {
    margin-bottom: 0.5rem;
  }

  .completion-step .solm8-logo.small {
    width: 56px;
  }

  .completion-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
  }

  .completion-subtitle {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
  }

  .completion-step .solm8-logo-wrapper {
    margin-bottom: 0.35rem;
  }

  .completion-step .solm8-logo.small {
    width: 48px;
  }

  .completion-title {
    font-size: 1.3rem;
    margin-bottom: 0.15rem;
  }

  .completion-subtitle {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }

  .completion-summary {
    padding: 0.85rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 14px;
    width: calc(100% - 2rem);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
  }

  .completion-greeting {
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    text-align: center;
  }

  /* Feature cards - horizontal row */
  .feature-highlights {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: calc(100% - 2rem);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .feature-highlight {
    flex: 1;
    padding: 0.4rem 0.5rem;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .feature-highlight-icon {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    border-radius: 8px;
  }

  .feature-highlight-label {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .feature-highlight-sublabel {
    font-size: 0.55rem;
    margin-top: 0.1rem;
  }

  /* Logo sizing defaults */
  .solm8-logo {
    width: 72px;
  }

  .solm8-logo.small {
    width: 44px;
  }
}

/* ==============================================
   EXTRA SMALL SCREENS (iPhone SE, 375px)
   ============================================== */
@media (max-width: 375px) {
  .setup-step {
    padding: 0.6rem 0.85rem;
  }

  .setup-nav {
    padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 10px));
    gap: 0.4rem;
  }

  .setup-btn {
    padding: 0.6rem 0.65rem;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .step-title,
  .setup-step-title {
    font-size: 1.1rem;
  }

  .step-subtitle,
  .setup-step-subtitle {
    font-size: 0.75rem;
    max-width: 250px;
  }

  /* Welcome */
  .welcome-step .solm8-logo {
    width: 48px;
  }

  .welcome-card {
    padding: 0.5rem;
    max-width: 210px;
  }

  .welcome-heart i {
    font-size: 1.5rem;
  }

  .welcome-message {
    font-size: 0.75rem;
  }

  /* Companion */
  .companion-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .companion-card h3 {
    font-size: 0.8rem;
  }

  .companion-card p {
    font-size: 0.6rem;
  }

  /* Completion */
  .completion-step .solm8-logo.small {
    width: 44px;
  }

  .completion-title {
    font-size: 1.15rem;
  }

  .completion-summary {
    padding: 0.75rem 1rem;
    max-width: 320px;
    width: calc(100% - 1.5rem);
  }

  .completion-greeting {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .feature-highlight {
    padding: 0.3rem 0.3rem;
    background: none !important;
    border: none !important;
  }

  .feature-highlight-icon {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .feature-highlight-label {
    font-size: 0.6rem;
  }

  .feature-highlight-sublabel {
    display: none; /* Hide sublabel on very small screens */
  }

  /* Inputs */
  .setup-input,
  .setup-select {
    padding: 0.55rem 0.7rem;
  }

  .name-chip {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
}