/* Ahen - Minimalist White & Crayon Pink Mobile & Desktop Design System */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;600;700&family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-pink: #FF5E86;
  --primary-gradient: linear-gradient(135deg, #FF5E86 0%, #FF7597 50%, #FFA8BA 100%);
  --ai-gradient: linear-gradient(135deg, #FF5E86 0%, #A855F7 50%, #6366F1 100%);
  --primary-hover: #E63968;
  --soft-pink: #FFF0F3;
  --border-pink: #FFE3E8;
  --accent-pink: #FFCCD5;
  --coral-accent: #FF8E72;
  --lavender: #E9D5FF;
  --mint: #D1FAE5;
  --gold: #F59E0B;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
}

/* =======================================================
   GLOBAL SCROLLBAR REMOVAL & SMOOTH JIGGLE PHYSICS
   ======================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  background: transparent !important;
}

html {
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Background Scroll Lock when Modal or Onboarding is Open */
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  overscroll-behavior: contain;
}

.modal-content,
.settings-modal-body,
#logger-categories-scroll,
#ai-chat-messages,
.main-viewport {
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

/* Smooth Interactive Jiggle / Press Physics */
button, .clickable-pill, .log-chip, .stepper-btn, .nav-tab-btn, .nav-arrow-btn, .icon-btn {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  padding: 0;
  user-select: none;
}

button:active, .clickable-pill:active, .log-chip:active, .stepper-btn:active {
  transform: scale(0.93) !important;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: 1px solid var(--border-pink);
  background-color: #FFFFFF;
  border-radius: 1.25rem;
  padding: 0.875rem 1.125rem;
  outline: none;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(255, 94, 134, 0.15);
}

/* Hide default browser up/down number spin arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: var(--border-pink);
  outline: none;
  border: none;
  padding: 0;
  margin: 0.75rem 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-pink);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 94, 134, 0.4);
  border: 2px solid #FFFFFF;
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-pink);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 94, 134, 0.4);
  border: 2px solid #FFFFFF;
}

/* =======================================================
   RESPONSIVE APP LAYOUT & SAFE AREA INSETS
   ======================================================= */

.app-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background-color: var(--bg-page);
}

.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background-color: var(--bg-page);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 1024px) {
  .app-container {
    max-width: 1280px;
    margin: 1.5rem auto;
    min-height: calc(100vh - 3rem);
    border-radius: 2.25rem;
    box-shadow: 0 25px 50px -15px rgba(255, 94, 134, 0.12), 0 0 0 1px rgba(255, 94, 134, 0.08);
    display: grid;
    grid-template-columns: 260px 1fr 340px;
    grid-template-rows: auto 1fr;
    overflow: hidden;
  }
}

/* Top App Header with Clean Mobile & Desktop Padding */
.app-header {
  grid-column: 1 / -1;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

@media (min-width: 1024px) {
  .app-header {
    padding: 1.125rem 1.75rem;
  }
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* 100% Round App Blossom Icon (Never Oval) */
.brand-icon {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-width: 2.25rem;
  min-height: 2.25rem;
  max-width: 2.25rem;
  max-height: 2.25rem;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 94, 134, 0.3);
  flex-shrink: 0;
}

/* Curvy, Aesthetic & Smooth Brand Typography */
.brand-title {
  font-family: 'Comfortaa', 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI Rounded", cursive, sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0F172A 0%, #334155 70%, #FF5E86 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.badge-pill {
  padding: 0.375rem 0.6875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid var(--border-pink);
  background-color: var(--soft-pink);
  color: var(--primary-hover);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-pill.streak {
  background-color: #FFF7ED;
  border-color: #FFEDD5;
  color: #EA580C;
}

.badge-pill.ai {
  background: var(--ai-gradient);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.icon-btn {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 9999px;
  background-color: var(--soft-pink);
  border: 1px solid var(--border-pink);
  color: var(--primary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-btn i, .icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-btn:hover {
  background-color: var(--primary-pink);
  color: #FFFFFF;
}

/* =======================================================
   DESKTOP SIDEBAR
   ======================================================= */
.desktop-sidebar {
  display: none;
  background-color: #FFFFFF;
  border-right: 1px solid var(--border-pink);
  padding: 1.5rem 1rem;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .desktop-sidebar {
    display: flex;
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  justify-content: flex-start;
  transition: all 0.2s ease;
}

.sidebar-btn i, .sidebar-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.sidebar-btn:hover {
  background-color: var(--soft-pink);
  color: var(--primary-pink);
}

.sidebar-btn.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 94, 134, 0.28);
}

.sidebar-btn.ai-btn.active {
  background: var(--ai-gradient);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.3);
}

/* =======================================================
   DESKTOP RIGHT PANEL (100% HIDDEN ON MOBILE)
   ======================================================= */
.desktop-right-panel {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-left: 1px solid var(--border-pink);
    background-color: #FFFFFF;
  }
}

/* =======================================================
   MAIN CONTENT VIEWPORT & SMOOTH SLIDE ANIMATION
   ======================================================= */
.main-viewport {
  padding: 0.875rem 1rem;
  overflow-y: auto;
  background-color: var(--bg-page);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 6rem;
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

@media (min-width: 1024px) {
  .main-viewport {
    padding: 1.5rem 1.75rem;
    padding-bottom: 2rem;
    gap: 1.375rem;
  }
}

.tab-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-view:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.tab-view.slide-left {
  animation: tabSlideLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-view.slide-right {
  animation: tabSlideRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tabSlideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes tabSlideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Card System */
.ahen-card {
  background-color: var(--bg-card);
  border-radius: 1.75rem;
  padding: 1.25rem 1.125rem;
  border: 1px solid var(--border-pink);
  box-shadow: 0 6px 24px -4px rgba(255, 168, 186, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Date Navigator Bar */
.date-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: #FFFFFF;
  border-radius: 1.25rem;
  border: 1px solid var(--border-pink);
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.05);
}

.nav-arrow-btn {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.875rem;
  background-color: var(--soft-pink);
  border: 1px solid var(--border-pink);
  color: var(--primary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow-btn i, .nav-arrow-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.nav-arrow-btn:hover {
  background-color: var(--primary-pink);
  color: #FFFFFF;
}

.date-nav-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dynamic Cycle Dial Card */
.cycle-dial-card {
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #FFFFFF 50%, var(--soft-pink) 100%);
}

.cycle-wheel-wrapper {
  position: relative;
  width: 15rem;
  height: 15rem;
  margin: 0.375rem auto 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cycle-wheel-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dial-center-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dial-phase-tag {
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 800;
  background-color: var(--soft-pink);
  color: var(--primary-hover);
  border: 1px solid var(--border-pink);
  white-space: nowrap;
}

.dial-day-hero {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0.25rem 0;
}

.dial-day-number {
  font-size: 2.875rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.04em;
  line-height: 1;
}

.dial-day-total {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-light);
  margin-left: 0.25rem;
}

/* Primary Action Buttons */
.btn-primary, .btn-primary-gradient {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 1.375rem;
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  box-shadow: 0 8px 24px -4px rgba(255, 94, 134, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-primary i, .btn-primary svg, .btn-primary-gradient svg {
  width: 1.125rem;
  height: 1.125rem;
}

.btn-primary:hover, .btn-primary-gradient:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-pink) 100%);
}

.btn-primary:disabled {
  background: #E2E8F0;
  color: #94A3B8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 100%;
  padding: 0.6875rem 1rem;
  border-radius: 1.125rem;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.btn-secondary i, .btn-secondary svg {
  width: 1rem;
  height: 1rem;
}

.btn-secondary:hover {
  background-color: var(--soft-pink);
  color: var(--primary-pink);
  border-color: var(--border-pink);
}

/* Milestone Badges Grid (2 per row on phone) */
.milestone-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.milestone-badge-card {
  padding: 1.125rem 0.875rem;
  border-radius: 1.375rem;
  text-align: center;
  border: 1.5px solid var(--border-pink);
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.04);
}

.milestone-badge-card.locked {
  opacity: 0.55;
  background-color: #F8FAFC;
  border-color: #E2E8F0;
  box-shadow: none;
}

.milestone-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 94, 134, 0.12);
  border-color: var(--primary-pink);
}

/* Hydration Glass Grid */
.glasses-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.375rem;
}

.glass-btn {
  height: 2.625rem;
  border-radius: 0.875rem;
  background-color: #F0F9FF;
  border: 1px solid #E0F2FE;
  color: #38BDF8;
  font-size: 0.875rem;
}

.glass-btn.filled {
  background: linear-gradient(135deg, #0EA5E9, #38BDF8);
  border-color: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.3);
}

/* =======================================================
   FULL-SCREEN DAILY HEALTH LOGGER (MATCHING FLO/CLUE DESIGN)
   ====================================================== */
.log-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-pink);
  background-color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Clean, Sleek Date Navigation in Modal Header */
.log-date-nav-btn {
  width: 1.75rem !important;
  height: 1.75rem !important;
  min-width: 1.75rem;
  max-width: 1.75rem;
  border-radius: 9999px;
  background-color: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.log-date-nav-btn:hover {
  background-color: var(--soft-pink);
  color: var(--primary-pink);
}

.log-date-nav-btn svg, .log-date-nav-btn i {
  width: 1.125rem !important;
  height: 1.125rem !important;
}

.log-search-bar-container {
  padding: 0.75rem 1.25rem 0.25rem;
  background-color: #FFFFFF;
}

.log-search-input {
  width: 100%;
  padding: 0.6875rem 1rem 0.6875rem 2.375rem;
  border-radius: 9999px;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  font-size: 0.8125rem;
  color: var(--text-main);
}

.log-search-icon-wrapper {
  position: absolute;
  left: 2rem;
  top: 1.35rem;
  color: var(--text-light);
  pointer-events: none;
}

.log-section-card {
  background-color: #FFFFFF;
  border-radius: 1.5rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid #F1F5F9;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.log-section-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-section-subtitle {
  font-size: 0.6875rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Category Chip Cloud with Multi-select Support */
.log-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.log-chip {
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #F8FAFC;
  border: 1.5px solid #F1F5F9;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  transition: all 0.2s ease;
}

.log-chip:hover {
  background-color: var(--soft-pink);
  border-color: var(--border-pink);
}

.log-chip.active {
  background-color: #FFF0F3;
  border-color: var(--primary-pink);
  color: var(--primary-hover);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.2);
}

.log-chip.active::after {
  content: '✓';
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 900;
  color: var(--primary-pink);
}

/* Pastel Icon Circle Badges inside Chips */
.chip-icon-pill {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.chip-icon-pill.pink { background-color: #FFE4E8; color: #FF5E86; }
.chip-icon-pill.amber { background-color: #FEF3C7; color: #D97706; }
.chip-icon-pill.purple { background-color: #F3E8FF; color: #9333EA; }
.chip-icon-pill.mint { background-color: #D1FAE5; color: #059669; }
.chip-icon-pill.sky { background-color: #E0F2FE; color: #0284C7; }
.chip-icon-pill.neutral { background-color: #F1F5F9; color: #64748B; }

/* Floating Bottom Action Bar */
.log-floating-apply-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.875rem 1.25rem;
  padding-bottom: max(env(safe-area-inset-bottom, 0px) + 0.75rem, 0.875rem);
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-pink);
  display: flex;
  justify-content: center;
  z-index: 20;
}

.btn-apply-log {
  width: 100%;
  max-width: 24rem;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 0.9375rem;
  font-weight: 800;
  box-shadow: 0 8px 24px -4px rgba(255, 94, 134, 0.4);
}

/* Horizontal Period Blood Color Chips (Multi-select) */
.blood-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.blood-swatch-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  border: 1.5px solid #F1F5F9;
  background-color: #F8FAFC;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.blood-swatch-btn:hover {
  background-color: var(--soft-pink);
  border-color: var(--border-pink);
}

.blood-swatch-btn.active {
  background-color: #FFF0F3;
  border-color: var(--primary-pink);
  color: var(--primary-hover);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.2);
}

.blood-swatch-btn.active::after {
  content: '✓';
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 900;
  color: var(--primary-pink);
}

.blood-color-circle {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* =======================================================
   SOOTHING CYCLICAL HEALTH & MINDFUL ANALYTICS REPORT
   ======================================================= */
.analytics-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.analytics-category-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #F1F5F9;
  border-radius: 9999px;
  padding: 0.21875rem;
  width: 100%;
  box-sizing: border-box;
  gap: 0.1875rem;
}

.analytics-select-btn {
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  border-radius: 9999px;
  font-size: 0.71875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  text-align: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
}

.analytics-select-btn:hover {
  color: var(--primary-pink);
}

.analytics-select-btn.active {
  background-color: #FFFFFF;
  color: var(--primary-pink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.smart-report-grid {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin-top: 0.375rem;
}

/* Soothing, Spacious Organic Insight Card with Full-Width Titles */
.smart-report-card {
  padding: 1.25rem 1.25rem;
  background: #FFFFFF;
  border-radius: 1.625rem;
  border: 1.5px solid #F8E7EB;
  box-shadow: 0 4px 16px -2px rgba(255, 94, 134, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  contain: content;
  transform: translateZ(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.smart-report-card:hover {
  box-shadow: 0 8px 24px -4px rgba(255, 94, 134, 0.12);
  border-color: var(--accent-pink);
  transform: translateY(-2px);
}

.report-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.report-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.report-icon-box {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 0.75rem;
  background-color: var(--soft-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border-pink);
}

.report-category-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
}

.report-category-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-timeframe-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  background-color: var(--soft-pink);
  color: var(--primary-hover);
  border: 1px solid var(--border-pink);
  white-space: nowrap;
  flex-shrink: 0;
}

.report-badge {
  padding: 0.25rem 0.5625rem;
  border-radius: 9999px;
  font-size: 0.65625rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.report-badge.pink { background-color: #FFF0F3; color: var(--primary-pink); border: 1px solid var(--border-pink); }
.report-badge.amber { background-color: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.report-badge.purple { background-color: #FAF5FF; color: #9333EA; border: 1px solid #F3E8FF; }
.report-badge.mint { background-color: #ECFDF5; color: #059669; border: 1px solid #D1FAE5; }
.report-badge.sky { background-color: #F0F9FF; color: #0284C7; border: 1px solid #E0F2FE; }

.report-main-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.015em;
  width: 100%;
}

.report-summary-text {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.55;
}

.report-recommendation-box {
  padding: 0.75rem 1rem;
  border-radius: 1.125rem;
  background-color: #FFF9FA;
  border: 1px solid #FFE4EA;
  font-size: 0.75rem;
  color: #64748B;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.btn-toggle-report-expand {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 1.25rem;
  background-color: var(--soft-pink);
  border: 1.5px solid var(--border-pink);
  color: var(--primary-pink);
  font-size: 0.8125rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.btn-toggle-report-expand:hover {
  background-color: var(--primary-pink);
  color: #FFFFFF;
  border-color: var(--primary-pink);
}

/* =======================================================
   CUSTOM SETTINGS GOAL & CONTRACEPTIVE CARD SELECTORS
   ======================================================= */
.setting-goal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.setting-goal-pill {
  padding: 0.75rem 0.625rem;
  border-radius: 1.125rem;
  background-color: #F8FAFC;
  border: 1.5px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  width: 100%;
}

.setting-goal-pill:hover {
  background-color: var(--soft-pink);
  border-color: var(--border-pink);
}

.setting-goal-pill.active {
  background-color: #FFF0F3;
  border-color: var(--primary-pink);
  box-shadow: 0 4px 12px rgba(255, 94, 134, 0.18);
}

.setting-goal-pill.active .setting-goal-title {
  color: var(--primary-hover);
}

.setting-goal-pill.active::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.625rem;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--primary-pink);
}

.setting-goal-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.setting-goal-desc {
  font-size: 0.625rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.setting-contraceptive-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.setting-contraceptive-chip {
  padding: 0.4375rem 0.75rem;
  border-radius: 9999px;
  background-color: #F8FAFC;
  border: 1.5px solid #F1F5F9;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
}

.setting-contraceptive-chip:hover {
  background-color: var(--soft-pink);
  border-color: var(--border-pink);
}

.setting-contraceptive-chip.active {
  background-color: #FFF0F3;
  border-color: var(--primary-pink);
  color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.2);
}

.setting-contraceptive-chip.active::after {
  content: '✓';
  font-size: 0.625rem;
  font-weight: 900;
  color: var(--primary-pink);
  margin-left: 0.125rem;
}

/* =======================================================
   BEAUTIFIED CYCLE & PERIOD STEPPER CONTROLS
   ======================================================= */
.setting-stepper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.setting-stepper-card {
  padding: 0.875rem 0.625rem;
  background-color: #F8FAFC;
  border: 1.5px solid #F1F5F9;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.setting-stepper-card:hover {
  border-color: var(--border-pink);
  background-color: var(--soft-pink);
}

.setting-stepper-label {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.setting-stepper-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

.stepper-btn {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-pink);
  color: var(--primary-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: 0 2px 6px rgba(255, 94, 134, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
}

.stepper-btn svg {
  display: block;
  margin: auto;
  pointer-events: none;
}

.stepper-btn:hover {
  background-color: var(--primary-pink);
  color: #FFFFFF;
  border-color: var(--primary-pink);
  box-shadow: 0 4px 12px rgba(255, 94, 134, 0.28);
}

.stepper-btn:active {
  transform: scale(0.9);
}

.modern-date-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-pink);
  border-radius: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.modern-date-input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(255, 94, 134, 0.15);
}

.quick-date-chip {
  padding: 0.5rem 0.25rem !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  justify-content: center !important;
  text-align: center !important;
  border-radius: 0.625rem !important;
}

.stepper-value-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.stepper-number {
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stepper-unit {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.125rem;
  line-height: 1;
}

/* Post Creator Form Styles */
.post-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.post-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-control {
  width: 100%;
  padding: 0.75rem 2.25rem 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--soft-pink);
  border: 1.5px solid var(--border-pink);
  border-radius: 0.875rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-select-control:focus {
  border-color: var(--primary-pink);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 94, 134, 0.15);
}

.custom-select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-pink);
  font-size: 0.875rem;
  pointer-events: none;
  font-weight: 800;
}

.post-form-input, .post-form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: #FAFAFC;
  border: 1.5px solid var(--border-pink);
  border-radius: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.post-form-input:focus, .post-form-textarea:focus {
  border-color: var(--primary-pink);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 94, 134, 0.15);
}

/* =======================================================
   REDESIGNED CALENDAR SELECTED DAY DRAWER
   ======================================================= */
.cal-drawer-container {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--soft-pink) 100%);
  border-radius: 1.75rem;
  padding: 1.125rem;
  border: 1px solid var(--border-pink);
  box-shadow: 0 6px 20px -2px rgba(255, 94, 134, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.cal-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-pink);
}

.btn-cal-drawer-action {
  padding: 0.4375rem 0.8125rem;
  border-radius: 9999px;
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255, 94, 134, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
}

.btn-cal-drawer-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(255, 94, 134, 0.38);
}

.btn-cal-drawer-action:active {
  transform: scale(0.93);
}

.cal-drawer-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.cal-metric-card {
  padding: 0.6875rem 0.875rem;
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid var(--border-pink);
}

/* =======================================================
   BEAUTIFUL 4-PHASE TIMELINE
   ======================================================= */
.phase-timeline-segmented {
  width: 100%;
  height: 0.875rem;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  background-color: #F1F5F9;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.phase-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.phase-segment.menstrual { background: linear-gradient(90deg, #FF5E86, #FF7597); }
.phase-segment.follicular { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.phase-segment.fertile { background: linear-gradient(90deg, #FF8E72, #FFA894); }
.phase-segment.luteal { background: linear-gradient(90deg, #9333EA, #C084FC); }

.phase-card-item {
  padding: 0.875rem 1rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border-pink);
  background-color: var(--soft-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =======================================================
   CALENDAR GRID
   ======================================================= */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
  text-align: center;
}

.cal-day-cell {
  height: 2.625rem;
  border-radius: 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #F8FAFC;
  color: var(--text-main);
  border: 1px solid transparent;
}

.cal-day-cell:hover {
  border-color: var(--border-pink);
  background-color: var(--soft-pink);
}

.cal-day-cell.menstrual {
  background-color: var(--primary-pink);
  color: #FFFFFF;
}

.cal-day-cell.ovulation {
  background-color: var(--coral-accent);
  color: #FFFFFF;
}

.cal-day-cell.fertile {
  background-color: var(--border-pink);
  color: var(--primary-hover);
}

.cal-day-cell.luteal {
  background-color: #FAF5FF;
  color: #9333EA;
}

.cal-day-cell.selected {
  outline: 2px solid var(--primary-pink);
  outline-offset: 1px;
}

.cal-day-cell.today {
  border: 2px solid var(--primary-pink);
}

/* =======================================================
   MOBILE BOTTOM NAVIGATION & SAFE AREA
   ======================================================= */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-pink);
  padding: 0.5rem 0.25rem;
  padding-bottom: max(env(safe-area-inset-bottom, 0px) + 0.375rem, 0.75rem);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
}

@media (min-width: 1024px) {
  .mobile-nav {
    display: none;
  }
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.25rem;
  color: var(--text-light);
  font-size: 0.6875rem;
  font-weight: 600;
  flex: 1;
}

.nav-tab-btn i, .nav-tab-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-tab-btn.active {
  color: var(--primary-pink);
  font-weight: 800;
}

.nav-tab-btn.ai-tab.active {
  color: #9333EA;
}

/* =======================================================
   MODALS & OVERLAYS (WITH FULLY ROUNDED ONBOARDING CARD)
   ======================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}

/* Bottom Sheet & Responsive Centered Modals */
.modal-content {
  width: 100%;
  max-width: 100%;
  background-color: #FFFFFF;
  border-radius: 1.75rem 1.75rem 0 0;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .modal-content {
    border-radius: 1.75rem;
    max-height: 86dvh;
    max-width: 28rem;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25);
  }
}

/* =======================================================
   ROOT APPLICATION PAGES (COMPLETE FULLPAGE SEPARATION)
   ======================================================= */
.fullpage-screen {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  background-color: var(--bg-page);
}

.fullpage-screen.hidden,
#splash-screen.hidden,
#auth-screen.hidden,
#onboarding-screen.hidden,
#main-app-screen.hidden,
.splash-screen-container.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* 1. ANIMATED SPLASH SCREEN */
.splash-screen-container {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 50% 30%, #FFF0F3 0%, #F8FAFC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.5rem;
  animation: splashPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splashPop {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.splash-blossom-aura {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 2rem;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(255, 94, 134, 0.35);
  animation: auraPulse 2s infinite alternate ease-in-out;
}

@keyframes auraPulse {
  0% { transform: scale(1); box-shadow: 0 12px 30px rgba(255, 94, 134, 0.35); }
  100% { transform: scale(1.08); box-shadow: 0 16px 40px rgba(255, 94, 134, 0.5); }
}

.splash-blossom-icon {
  font-size: 2.75rem;
}

.splash-brand-title {
  font-family: 'Comfortaa', 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-pink);
  letter-spacing: -0.02em;
}

.splash-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 18rem;
  line-height: 1.5;
}

.splash-loader-bar {
  width: 8rem;
  height: 4px;
  background: #FFE3E8;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 1rem;
}

.splash-loader-fill {
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  animation: splashFill 1.4s infinite ease-in-out;
}

@keyframes splashFill {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 2. DEDICATED SEPARATE LOGIN & AUTH PAGE WITH FLORAL DOODLES */
.auth-screen-container {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 50% 25%, #FFF0F4 0%, #F8FAFC 70%, #F1F5F9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Floral Doodle Background Layer */
.auth-doodle-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.doodle-item {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(255, 94, 134, 0.15));
}

.doodle-tl {
  top: -25px;
  left: -25px;
  width: 220px;
  height: 220px;
  animation: doodleSway 9s ease-in-out infinite alternate;
}

.doodle-tr {
  top: 10px;
  right: -25px;
  width: 190px;
  height: 190px;
  animation: doodleFloat 11s ease-in-out infinite alternate;
}

.doodle-bl {
  bottom: -20px;
  left: -15px;
  width: 210px;
  height: 210px;
  animation: doodleFloat 10s ease-in-out infinite alternate-reverse;
}

.doodle-br {
  bottom: -25px;
  right: -20px;
  width: 230px;
  height: 230px;
  animation: doodleSway 12s ease-in-out infinite alternate;
}

@media (min-width: 768px) {
  .doodle-tl { width: 340px; height: 340px; top: -30px; left: -30px; }
  .doodle-tr { width: 290px; height: 290px; top: 20px; right: 20px; }
  .doodle-bl { width: 310px; height: 310px; bottom: 0px; left: 10px; }
  .doodle-br { width: 350px; height: 350px; bottom: -20px; right: 0px; }
}

.doodle-floating-petal {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.45;
  pointer-events: none;
  animation: floatPetal 14s linear infinite;
}

.doodle-floating-petal.p1 { top: 16%; left: 14%; animation-duration: 12s; animation-delay: 0s; font-size: 1.75rem; }
.doodle-floating-petal.p2 { top: 22%; right: 16%; animation-duration: 9s; animation-delay: 2s; font-size: 1.25rem; }
.doodle-floating-petal.p3 { bottom: 20%; left: 10%; animation-duration: 15s; animation-delay: 4s; font-size: 1.5rem; }
.doodle-floating-petal.p4 { bottom: 28%; right: 12%; animation-duration: 11s; animation-delay: 1s; font-size: 1.35rem; }
.doodle-floating-petal.p5 { top: 52%; left: 6%; animation-duration: 10s; animation-delay: 3s; font-size: 1.1rem; }
.doodle-floating-petal.p6 { top: 62%; right: 8%; animation-duration: 13s; animation-delay: 5s; font-size: 1.6rem; }

@keyframes doodleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
  100% { transform: translateY(10px) rotate(-3deg); }
}

@keyframes doodleSway {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(-4deg); }
  100% { transform: scale(0.96) rotate(4deg); }
}

@keyframes floatPetal {
  0% { transform: translateY(0px) rotate(0deg); opacity: 0.35; }
  50% { transform: translateY(-24px) rotate(180deg); opacity: 0.65; }
  100% { transform: translateY(0px) rotate(360deg); opacity: 0.35; }
}

.auth-content-card {
  width: 100%;
  max-width: 24.5rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 2.25rem;
  padding: 2.25rem 1.75rem;
  border: 1.5px solid #FCE7EB;
  box-shadow: 0 24px 50px -12px rgba(255, 94, 134, 0.22);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
  position: relative;
  z-index: 10;
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-blossom-badge {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 1.25rem;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  color: white;
  margin: 0 auto 0.5rem;
  box-shadow: 0 8px 20px rgba(255, 94, 134, 0.3);
}

.auth-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
}

.auth-subtitle {
  font-size: 0.78125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.auth-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-auth-option {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border-radius: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  text-align: left;
}

.btn-auth-option:active {
  transform: scale(0.97);
}

.btn-auth-option.google:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.btn-auth-option.guest {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
}

.btn-auth-option.guest:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

/* 3. DEDICATED SEPARATE FULLPAGE ONBOARDING */
.onboarding-screen-full {
  min-height: 100vh;
  width: 100%;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* =======================================================
   CUSTOM BOTANICAL CALENDAR DATEPICKER COMPONENT
   ======================================================= */
.custom-botanical-datepicker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.datepicker-selected-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid #FFE4E8;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.04);
}

.datepicker-selected-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.datepicker-icon {
  font-size: 1.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #FFF0F3;
  border-radius: 0.625rem;
}

.datepicker-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.datepicker-date-display {
  display: block;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  margin-top: 0.0625rem;
}

.datepicker-relative-badge {
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  background: #FFE8EC;
  color: var(--primary-pink);
}

.datepicker-calendar-card {
  background: #FFFFFF;
  border: 1px solid #FFE8EC;
  border-radius: 1.125rem;
  padding: 0.625rem 0.625rem 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.datepicker-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  padding: 0 0.25rem;
}

.datepicker-month-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-main);
}

.datepicker-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #FFE4E8;
  background: #FFF9FA;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.datepicker-nav-btn:hover {
  background: #FFE8EC;
  border-color: #FF5E86;
  color: #FF5E86;
}

.datepicker-nav-btn:active {
  transform: scale(0.92);
}

.datepicker-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: #94A3B8;
  margin-bottom: 0.125rem;
}

.datepicker-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.125rem;
  text-align: center;
}

.cal-day-cell {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.cal-day-cell:hover:not(.disabled) {
  background: #FFF0F3;
  color: var(--primary-pink);
}

.cal-day-cell:active:not(.disabled) {
  transform: scale(0.9);
}

.cal-day-cell.today {
  border: 1.5px solid #FF8DA7;
  font-weight: 800;
}

.cal-day-cell.selected {
  background: linear-gradient(135deg, #FF5E86 0%, #FF8DA7 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(255, 94, 134, 0.4);
  transform: scale(1.06);
}

.cal-day-cell.other-month {
  color: #CBD5E1;
  opacity: 0.4;
}

.cal-day-cell.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.datepicker-quick-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}

.datepicker-quick-chips .quick-date-chip {
  padding: 0.3125rem 0.25rem;
  font-size: 0.6875rem;
  border-radius: 0.625rem;
}

.datepicker-quick-chips .quick-date-chip.active {
  background: #FFE8EC;
  border-color: #FF5E86;
  color: #FF5E86;
  font-weight: 700;
}

/* 4. MAIN APP CONTAINER */
#main-app-screen {
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-page);
}

.onboarding-top-bar {
  padding: 1.125rem 1.25rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F8FAFC;
}

.onboarding-progress-track {
  flex: 1;
  height: 6px;
  background-color: #F1F5F9;
  border-radius: 9999px;
  margin: 0 1rem;
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 9999px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-step-body {
  flex: 1;
  max-width: 28rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.onboard-step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.onboard-step.hidden,
div.onboard-step.hidden {
  display: none !important;
  visibility: hidden !important;
}

.tab-view.hidden,
section.tab-view.hidden,
#tab-today.hidden,
#tab-calendar.hidden,
#tab-community.hidden,
#tab-bloom.hidden,
#tab-ai.hidden {
  display: none !important;
  visibility: hidden !important;
}

.modal-overlay.hidden,
div.modal-overlay.hidden,
#modal-cycle-settings.hidden,
#modal-symptom-logger.hidden,
#modal-create-post.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* In-App Avatar Selection Grid */
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.avatar-preset-card {
  padding: 1rem 0.5rem;
  border-radius: 1.25rem;
  background-color: #F8FAFC;
  border: 2px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-preset-card:active {
  transform: scale(0.94);
}

.avatar-preset-card.active {
  background-color: #FFF0F3;
  border-color: var(--primary-pink);
  box-shadow: 0 4px 14px rgba(255, 94, 134, 0.2);
}

.avatar-preset-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 1px solid var(--border-pink);
}

.avatar-preset-icon.sakura { background: #FFE8EC; }
.avatar-preset-icon.lotus { background: #FEF3C7; }
.avatar-preset-icon.orchid { background: #D1FAE5; }

.avatar-preset-name {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

/* =======================================================
   SETTINGS MODAL - SPACIOUS WHITE SPACE & CARD SECTIONS
   ======================================================= */
.settings-modal-content {
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background-color: #F8FAFC !important;
  padding: 0 !important;
  border-radius: 1.75rem 1.75rem 0 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .settings-modal-content {
    border-radius: 1.75rem;
    max-height: 86dvh;
    max-width: 28rem;
  }
}

.settings-modal-header {
  padding: 1rem 1.25rem;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.settings-modal-body {
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.settings-card-section {
  background-color: #FFFFFF;
  border-radius: 1.25rem;
  padding: 1rem;
  border: 1.5px solid #F1F5F9;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.03);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.settings-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  background: var(--soft-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.settings-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.settings-card-desc {
  font-size: 0.65625rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.0625rem;
}

.settings-modal-footer {
  padding: 0.75rem 1.25rem max(env(safe-area-inset-bottom, 0px) + 0.5rem, 0.75rem);
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-pink);
  flex-shrink: 0;
}

/* Mobile Profile Avatar & Username Removal from Top Bar */
@media (max-width: 640px) {
  #btn-header-profile, .desktop-only-profile, #header-username-text, .desktop-only-username {
    display: none !important;
  }
}

@media (min-width: 641px) {
  #btn-header-profile {
    display: inline-flex !important;
    align-items: center;
    gap: 0.375rem;
  }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =======================================================
   SISTERHOOD COMMUNITY & ANONYMOUS FORUM
   ======================================================= */
.community-filter-bar {
  display: flex;
  background-color: #F1F5F9;
  border-radius: 9999px;
  padding: 0.1875rem;
  gap: 0.1875rem;
  width: 100%;
  box-sizing: border-box;
}

.community-filter-pill {
  flex: 1;
  padding: 0.4375rem 0.25rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.community-filter-pill.active {
  background-color: #FFFFFF;
  color: var(--primary-pink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.community-post-card {
  padding: 1.125rem 1.125rem;
  background: #FFFFFF;
  border-radius: 1.5rem;
  border: 1.5px solid #F8E7EB;
  box-shadow: 0 4px 16px -2px rgba(255, 94, 134, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  contain: content;
}

.post-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-author-avatar {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  background-color: var(--soft-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  border: 1px solid var(--border-pink);
  flex-shrink: 0;
}

.post-author-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.post-timestamp {
  font-size: 0.625rem;
  color: var(--text-light);
}

.post-category-tag {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: #F1F5F9;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-category-tag.questions { background-color: #FFF0F3; color: var(--primary-pink); border: 1px solid var(--border-pink); }
.post-category-tag.remedies { background-color: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.post-category-tag.lifestyle { background-color: #ECFDF5; color: #059669; border: 1px solid #D1FAE5; }

.post-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.post-body {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.post-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid #F8FAFC;
  margin-top: 0.125rem;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: transparent;
  transition: all 0.18s ease;
  cursor: pointer;
}

.post-action-btn:active {
  transform: scale(0.92);
}

.post-action-btn.liked {
  color: var(--primary-pink);
  font-weight: 700;
}

/* Replies list */
.post-replies-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #F8FAFC;
  border-radius: 1rem;
  margin-top: 0.25rem;
  border: 1px solid #F1F5F9;
}

.reply-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.reply-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reply-author {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reply-body {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.reply-input-box {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.reply-input {
  flex: 1;
  padding: 0.4375rem 0.75rem;
  font-size: 0.6875rem;
  border-radius: 9999px;
  border: 1px solid var(--border-pink);
  background-color: #FFFFFF;
}

.reply-submit-btn {
  padding: 0.4375rem 0.8125rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  cursor: pointer;
}

/* =======================================================
   AHEN AI CYCLICAL EXPERT CHAT STYLES
   ======================================================= */
.ai-prompt-chip {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  color: #7E22CE;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-prompt-chip:hover {
  background: #F3E8FF;
  border-color: #D8B4FE;
  transform: translateY(-1px);
}

.ai-prompt-chip:active {
  transform: scale(0.96);
}

.ai-chat-msg {
  display: flex;
  gap: 0.625rem;
  max-width: 90%;
  animation: fadeIn 0.25s ease;
}

.ai-chat-msg.ai {
  align-self: flex-start;
}

.ai-chat-msg.user {
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 82%;
}

.ai-chat-avatar {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ai-chat-avatar.ai {
  background: var(--ai-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.ai-chat-bubble {
  padding: 0.625rem 0.875rem;
  border-radius: 1.125rem;
  font-size: 0.78125rem;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  word-break: break-word;
}

.ai-chat-bubble.ai {
  background: #FFFFFF;
  border: 1px solid #F3E8FF;
  color: var(--text-main);
  border-top-left-radius: 0.25rem;
}

.ai-chat-bubble.ai strong {
  color: #7E22CE;
}

.ai-chat-bubble.user {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-bottom-right-radius: 0.25rem;
  border-top-right-radius: 1.125rem;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.2);
}

.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  border-radius: 1rem;
  font-size: 0.6875rem;
  color: #7E22CE;
  font-weight: 600;
}

.ai-typing-dot {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: #A855F7;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Dynamic Interactive Options Bar (Token Budget Controlled) */
.ai-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.375rem 0.625rem;
  border-radius: 9999px;
  background-color: #FAF5FF;
  border: 1.5px solid #E9D5FF;
  color: #7E22CE;
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.ai-reset-btn:hover {
  background-color: #F3E8FF;
  border-color: #D8B4FE;
  color: #6B21A8;
}

.ai-reset-btn:active {
  transform: scale(0.95);
}

.ai-reset-btn svg {
  display: block;
  flex-shrink: 0;
}

/* AI Companion Modern Conversational Screen */
#tab-ai {
  height: calc(100dvh - 7rem);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ai-chat-card-full {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: radial-gradient(circle at 80% 15%, rgba(243, 232, 255, 0.4) 0%, rgba(255, 240, 243, 0.3) 40%, #FFFFFF 100%);
  border-radius: 1.5rem;
  border: 1px solid #F1E5F8;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.04);
  overflow: hidden;
}

@media (max-width: 768px) {
  #tab-ai {
    height: calc(100dvh - 6.25rem);
    padding: 0;
    margin: 0;
  }
  .ai-chat-card-full {
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }
}

.ai-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(233, 213, 255, 0.6);
  flex-shrink: 0;
  z-index: 10;
}

#ai-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 0.875rem 0.875rem 1rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none !important;
}

#ai-chat-messages::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.ai-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 88%;
  animation: fadeIn 0.2s ease;
}

.ai-chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-chat-msg.ai {
  align-self: flex-start;
}

.ai-chat-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ai-chat-avatar.ai {
  background: linear-gradient(135deg, #A855F7 0%, #7E22CE 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(168, 85, 247, 0.35);
}

.ai-chat-bubble {
  padding: 0.8125rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}

.ai-chat-bubble.ai {
  background: #FFFFFF;
  color: var(--text-main);
  border-radius: 0.375rem 1.25rem 1.25rem 1.25rem;
  border: 1px solid #F1E5F8;
  box-shadow: 0 2px 12px rgba(168, 85, 247, 0.05);
}

.ai-chat-bubble.user {
  background: linear-gradient(135deg, #7E22CE 0%, #A855F7 100%);
  color: #FFFFFF;
  border-radius: 1.25rem 0.375rem 1.25rem 1.25rem;
  box-shadow: 0 3px 12px rgba(126, 34, 206, 0.25);
  font-weight: 500;
}

/* Modern AI Bottom Dock */
.ai-bottom-dock {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.625rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(233, 213, 255, 0.6);
  flex-shrink: 0;
  z-index: 10;
}

.ai-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.125rem 0.25rem 0.125rem;
}

.ai-dock-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #7E22CE;
  letter-spacing: 0.02em;
}

.ai-quick-carousel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
  max-height: 155px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.125rem 0.125rem 0.25rem;
  scrollbar-width: thin;
}

.ai-quick-carousel::-webkit-scrollbar {
  width: 4px;
}

.ai-quick-carousel::-webkit-scrollbar-thumb {
  background: #E9D5FF;
  border-radius: 4px;
}

.ai-carousel-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.8125rem;
  border-radius: 9999px;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  color: #6B21A8;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ai-carousel-pill:hover {
  background: #F3E8FF;
  border-color: #A855F7;
  transform: translateY(-1px);
}

.ai-carousel-pill:active {
  transform: scale(0.95);
  background: #E9D5FF;
}

.ai-carousel-pill[data-cat="root"] {
  background: #F5F3FF;
  border-color: #C084FC;
  color: #581C87;
  font-weight: 800;
}

.ai-active-selection-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4375rem 0.875rem;
  background: #F3E8FF;
  border: 1px solid #D8B4FE;
  border-radius: 9999px;
  color: #6B21A8;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-auth-gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: #FFFFFF;
  border-radius: 1.5rem;
  border: 1px solid var(--border-pink);
  box-shadow: 0 8px 30px rgba(255, 94, 134, 0.08);
  margin: auto 0;
}

.ai-gate-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1.25rem;
  background: var(--ai-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
  margin-bottom: 1.25rem;
}

/* Custom In-App Confirmation Modal */
.confirm-modal-card {
  width: 90%;
  max-width: 24rem;
  background: #FFFFFF;
  border-radius: 1.75rem !important;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(233, 213, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal-icon-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFF0F3 0%, #FFE4EC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(255, 94, 134, 0.15);
}

.confirm-modal-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.confirm-modal-message {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.625rem;
  width: 100%;
}

.btn-modal-cancel {
  flex: 1;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  color: #64748B;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.btn-modal-action {
  flex: 1.25;
  padding: 0.75rem;
  border-radius: 1rem;
  border: none;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-modal-primary {
  background: linear-gradient(135deg, #FF5E86 0%, #FF8DA7 100%);
  color: #FFFFFF;
}

.btn-modal-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
}

.btn-modal-reset {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: #FFFFFF;
}

.btn-modal-neutral {
  background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
  color: #FFFFFF;
}

.btn-modal-action:active,
.btn-modal-cancel:active {
  transform: scale(0.96);
}

.settings-guest-link-banner {
  padding: 0.875rem;
  background: linear-gradient(135deg, #FAF5FF 0%, #FFF0F3 100%);
  border: 1.5px solid #E9D5FF;
  border-radius: 1rem;
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.08);
}

.hidden {
  display: none !important;
}
