/* =========================================================================
   MAUSAM 2.0 — SIH 2026
   Clean, mobile-first design system
   ========================================================================= */

/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-900: #0f2557;
  --blue-800: #1a3a80;
  --blue-700: #1e4fad;
  --blue-600: #1e60f1;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --green-600: #16a34a;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;

  --orange-600: #ea580c;
  --orange-100: #fed7aa;
  --orange-50:  #fff7ed;

  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --red-50:  #fef2f2;

  --yellow-500: #eab308;
  --yellow-100: #fef9c3;

  --gray-900: #0f172a;
  --gray-700: #1e293b;
  --gray-600: #334155;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50:  #f8fafc;

  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(15,37,87,0.10);
  --shadow-lg: 0 8px 32px rgba(15,37,87,0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: #d1ddf5;
  color: var(--gray-700);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* ── Phone Shell ──────────────────────────────────────────────────────── */
.phone-shell {
  position: relative;
  width: 390px;
  height: 844px;
  background: #0b1d4e;
  border-radius: 48px;
  border: 8px solid #1a1a2e;
  background-clip: padding-box;
  box-shadow:
    0 0 0 2px #2a2a4e,
    0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 28px;
  background: #1a1a2e;
  border-radius: 0 0 20px 20px;
  z-index: 100;
}

@media (max-width: 420px) {
  body { padding: 0; background: var(--white); }
  .phone-shell {
    width: 100%; height: 100vh;
    border-radius: 0; border: none;
    box-shadow: none;
  }
  .phone-notch { display: none; }
}

/* ── Screen System ────────────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%; height: 100%;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  position: absolute;
  top: 0; left: 0;
  background: var(--white);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.screen::-webkit-scrollbar { display: none; width: 0; height: 0; }
.screen.active { display: flex; animation: screenFadeIn 0.28s ease-out; }
.app-screen {
  overflow: hidden;
  background: #0b1d4e;
}

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

/* ── Shared utilities ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue-600); color: var(--white);
  border: none; border-radius: var(--radius-md);
  padding: 14px 24px; font: 600 1rem var(--font);
  cursor: pointer; width: 100%; text-align: center;
  transition: background 0.18s, transform 0.1s, opacity 0.18s;
  letter-spacing: 0.01em;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-700); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--blue-600);
  border: 1.5px solid var(--blue-600); border-radius: var(--radius-md);
  padding: 13px 24px; font: 600 0.95rem var(--font);
  cursor: pointer; width: 100%;
  transition: background 0.18s, color 0.18s;
}
.btn-outline:hover { background: var(--blue-50); }

.btn-outline-sm {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--blue-600);
  border: 1.5px solid var(--blue-600); border-radius: var(--radius-full);
  padding: 6px 16px; font: 600 0.8rem var(--font);
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s;
}
.btn-outline-sm:hover { background: var(--blue-50); }

.btn-outline-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--red-600);
  border: 1.5px solid var(--red-600); border-radius: var(--radius-md);
  padding: 12px 20px; font: 600 0.9rem var(--font);
  cursor: pointer; width: 100%; margin-top: 14px;
  transition: background 0.18s;
}
.btn-outline-danger:hover { background: var(--red-50); }

.btn-text-blue {
  background: none; border: none; color: var(--blue-600);
  font: 600 0.85rem var(--font); cursor: pointer; padding: 0;
}
.btn-why {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-50); color: var(--blue-600);
  border: 1px solid var(--blue-100); border-radius: var(--radius-full);
  padding: 6px 14px; font: 600 0.78rem var(--font); cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
}
.btn-why:hover { background: var(--blue-100); }

.icon-btn {
  position: relative; background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1rem; cursor: pointer;
  transition: background 0.18s;
}
.icon-btn:hover { background: rgba(255,255,255,0.25); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: #f97316;
  border-radius: 50%; border: 1.5px solid var(--blue-600);
}

.demo-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--yellow-100); color: #854d0e;
  border: 1px solid #fde047; border-radius: var(--radius-full);
  padding: 4px 12px; font: 500 0.72rem var(--font);
  margin-bottom: 14px;
}

.demo-tag {
  background: var(--orange-50); color: var(--orange-600);
  border: 1px solid var(--orange-100); border-radius: 6px;
  padding: 2px 8px; font: 700 0.7rem var(--font);
}

.demo-tag-inline {
  color: var(--orange-600); font-size: 0.75rem; font-weight: 600;
}

/* ── Splash Screen (Matches Reference Image 2) ────────────────────────── */
.splash-bg {
  background: linear-gradient(180deg, #0d3478 0%, #154c9f 28%, #1d62c9 58%, #2974de 100%);
  color: var(--white);
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  user-select: none;
}

/* Status bar on splash */
.splash-status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 25;
}
.ssb-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
}

/* Rain overlay (preserved animations) */
.splash-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 2; overflow: hidden;
}

.rain-wrap { position: absolute; inset: 0; }
.drop {
  position: absolute; top: -40px; width: 1.5px; height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.6));
  border-radius: 1px; animation: dropFall 0.9s linear infinite;
}
.drop:nth-child(1)  { left:6%;  animation-delay:0s; }
.drop:nth-child(2)  { left:18%; animation-delay:0.28s; }
.drop:nth-child(3)  { left:32%; animation-delay:0.1s; }
.drop:nth-child(4)  { left:48%; animation-delay:0.45s; }
.drop:nth-child(5)  { left:62%; animation-delay:0.2s; }
.drop:nth-child(6)  { left:76%; animation-delay:0.58s; }
.drop:nth-child(7)  { left:88%; animation-delay:0.35s; }
.drop:nth-child(8)  { left:40%; animation-delay:0.7s; }
.drop:nth-child(9)  { left:55%; animation-delay:0.15s; }
.drop:nth-child(10) { left:25%; animation-delay:0.82s; }

@keyframes dropFall {
  0%   { transform: translateY(0);    opacity: 0; }
  8%   { opacity: 0.6; }
  92%  { opacity: 0.6; }
  100% { transform: translateY(870px); opacity: 0; }
}

/* Lightning flash */
.lightning-flash {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.28);
  opacity: 0; pointer-events: none;
  animation: lightning 4.5s ease-in-out infinite;
}
@keyframes lightning {
  0%,33%,37%,41%,68%,72%,100% { opacity: 0; }
  35%,39% { opacity: 0.28; }
  70%      { opacity: 0.42; }
}

/* Stars */
.splash-stars { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.star {
  position: absolute; background: white; border-radius: 50%;
  animation: starTwinkle 3s ease-in-out infinite alternate;
}
.star:nth-child(even)  { animation-delay: 1.2s; }
.star:nth-child(3)     { animation-delay: 0.6s; }
@keyframes starTwinkle {
  0%   { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.9; transform: scale(1.4); }
}

/* Drift Clouds in background */
.splash-drift-clouds {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.drift-cloud {
  position: absolute;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
  border-radius: 60px; filter: blur(6px);
}
.dc1 { width: 190px; height: 50px; top: 22%; left: -200px; animation: cloudDrift1 6s linear infinite; }
.dc2 { width: 240px; height: 65px; top: 46%; left: -250px; animation: cloudDrift2 7.5s linear 1.5s infinite; }

@keyframes cloudDrift1 {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 0.7; } 85% { opacity: 0.7; }
  100% { transform: translateX(650px); opacity: 0; }
}
@keyframes cloudDrift2 {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 0.55; } 85% { opacity: 0.55; }
  100% { transform: translateX(680px); opacity: 0; }
}

/* Mountain landscape with round tree foothills */
.splash-mountains-wrap {
  position: absolute; bottom: 0; left: 0; right: 0;
  pointer-events: none; z-index: 3;
}
.mtn { position: absolute; bottom: 0; left: 0; width: 100%; display: block; }
.mtn-distant    { height: 370px; }
.mtn-midrange   { height: 300px; }
.mtn-foreground { height: 220px; }

/* Main Content: centered in the upper sky */
.splash-content-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 24px 0;
}

.splash-hero-icon {
  margin-bottom: 20px;
}

.float-anim { animation: floatUpDown 3.5s ease-in-out infinite alternate; }
@keyframes floatUpDown {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.splash-main-title {
  font-size: 2.55rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
  text-shadow: 0 3px 18px rgba(0,0,0,0.22);
}

.splash-clean-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
  line-height: 1.45;
  margin: 0 auto;
  max-width: 260px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* Bottom Section: Get Started Button + Powered by IMD Crest */
.splash-bottom-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  padding: 0 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.splash-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  background: var(--white);
  color: #123c8a;
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  font: 700 1.02rem var(--font);
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 28px rgba(11, 29, 78, 0.35);
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
}
.splash-cta-btn:hover {
  background: #f0f6ff;
  box-shadow: 0 10px 34px rgba(11, 29, 78, 0.45);
}
.splash-cta-btn:active {
  transform: scale(0.98);
}

/* Bottom branding footer sitting on dark foothills */
.splash-bottom-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.imd-official-seal {
  width: 28px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

/* Progress bar */
.splash-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.12); z-index: 20;
}
.splash-progress-fill {
  height: 100%; width: 0; background: var(--white);
  border-radius: 2px; box-shadow: 0 0 6px rgba(255,255,255,0.6);
}
.splash-progress-fill.run { animation: progressRun 4.5s linear forwards; }
@keyframes progressRun { 0%{width:0%} 100%{width:100%} }

/* ── Onboarding Screens ───────────────────────────────────────────────── */
.onboard-header {
  padding: 44px 24px 20px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
}

.step-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.dot { width: 28px; height: 4px; background: var(--gray-200); border-radius: 2px; transition: background 0.3s; }
.dot.active { background: var(--blue-600); }

.onboard-header h2 { font-size: 1.35rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.onboard-header p  { font-size: 0.88rem; color: var(--gray-500); }

.onboard-question {
  padding: 6px 24px 14px;
  font-size: 0.88rem; font-weight: 600; color: var(--gray-600);
}

.onboard-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  margin-top: auto;
}

/* ── Reference-style Persona Screen ──────────────────────────────────── */
.screen-white { background: var(--white); }

/* Status bar mock */
.onboard-status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 6px; color: var(--gray-700);
  font-size: 0.78rem; font-weight: 700;
}
.osb-icons { display: flex; gap: 5px; color: var(--gray-700); }

.persona-screen-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 6px 20px 24px; overflow-y: auto;
}

.persona-heading-area { text-align: center; padding: 10px 10px 6px; }
.persona-main-q {
  font-size: 1.35rem; font-weight: 800; color: var(--gray-900);
  line-height: 1.3; margin-bottom: 6px;
}
.persona-sub-q { font-size: 0.85rem; color: var(--gray-500); }

/* Reference persona grid: 3 top + 2 bottom centred */
.persona-ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 auto;
}
/* 4th and 5th card on second row centred under 1st+2nd columns */
.persona-ref-grid .persona-ref-card:nth-child(4) { grid-column: 1; }
.persona-ref-grid .persona-ref-card:nth-child(5) { grid-column: 2; }

.persona-ref-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  padding: 22px 10px 16px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; cursor: pointer; text-align: center;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.persona-ref-card:hover { border-color: var(--blue-500); }
.persona-ref-card.selected {
  border: 2px solid var(--blue-600);
  box-shadow: 0 0 0 1px var(--blue-600);
}

/* Icon — no coloured circle, just the icon in IMD blue */
.prc-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
}
.farmer-ref  { color: #2eb55a; }   /* leaf stays green */
.fitness-ref { color: #1e60f1; }   /* running man blue */
.commuter-ref { color: #1e60f1; }  /* car blue */
.traveler-ref { color: #1e60f1; }  /* plane blue */
.family-ref  { color: #1e60f1; }   /* family blue */

.prc-label {
  font-size: 0.83rem; font-weight: 700; color: var(--gray-800);
}

/* Checkmark badge (top-right corner) */
.prc-check {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-600); color: var(--white);
  display: none; align-items: center; justify-content: center;
  font-size: 0.62rem; border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(30,96,241,0.3);
}
.persona-ref-card.selected .prc-check { display: flex; }

/* Footer buttons */
.persona-footer {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding-top: 20px; margin-top: auto;
}

.btn-ref-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue-600); color: var(--white);
  border: none; border-radius: 14px;
  padding: 15px 24px; font: 700 1rem var(--font);
  cursor: pointer; width: 100%; letter-spacing: 0.01em;
  transition: background 0.18s, transform 0.1s;
}
.btn-ref-primary:hover:not(:disabled) { background: var(--blue-700); }
.btn-ref-primary:active { transform: scale(0.98); }
.btn-ref-primary:disabled { background: #93b4f8; cursor: not-allowed; }

.btn-skip-link {
  background: none; border: none;
  color: var(--blue-600); font: 600 0.9rem var(--font);
  cursor: pointer; padding: 4px;
  transition: color 0.15s;
}
.btn-skip-link:hover { color: var(--blue-800); }

/* Old persona grid kept for change-persona modal */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 24px 16px;
  flex: 1; overflow-y: auto;
}
.persona-grid .persona-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 180px; margin: 0 auto; width: 100%;
}

.persona-card {
  position: relative;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 20px 14px 16px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; cursor: pointer; text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: var(--shadow-sm);
}
.persona-card:hover { border-color: var(--blue-500); box-shadow: var(--shadow-md); }
.persona-card.selected {
  border-color: var(--blue-600); background: var(--blue-50);
  box-shadow: 0 4px 16px rgba(30,96,241,0.18);
}
.persona-card strong { font-size: 0.9rem; color: var(--gray-900); }
.persona-card span   { font-size: 0.74rem; color: var(--gray-500); line-height: 1.4; }

.persona-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.fitness-icon  { background: var(--green-100); color: var(--green-600); }
.commuter-icon { background: var(--blue-100);  color: var(--blue-700); }
.traveler-icon { background: #e0e7ff;           color: #4338ca; }
.farmer-icon   { background: #dcfce7;           color: #15803d; }
.family-icon   { background: #fce7f3;           color: #be185d; }

.check-badge {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue-600); color: var(--white);
  display: none; align-items: center; justify-content: center;
  font-size: 0.68rem; border: 2px solid var(--white);
}
.persona-card.selected .check-badge { display: flex; }

/* Interest Chips */
.interests-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 24px 16px; flex: 1;
}

.interest-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 14px 16px;
  cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--gray-700);
  transition: border-color 0.18s, background 0.18s;
}
.interest-chip i { font-size: 1rem; color: var(--gray-500); transition: color 0.18s; }
.interest-chip:hover { border-color: var(--blue-500); }
.interest-chip.selected {
  border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700);
}
.interest-chip.selected i { color: var(--blue-600); }

/* Location screen */
.location-icon-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px; gap: 12px;
}
.location-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--blue-50); border: 2px solid var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--blue-600);
}
.location-hint { font-size: 0.85rem; color: var(--gray-500); text-align: center; }
.location-btn { margin: 0 24px; width: calc(100% - 48px); }

.divider {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
}
.divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--gray-200); }
.divider span { font-size: 0.78rem; color: var(--gray-400); white-space: nowrap; }

.city-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 24px 16px;
}
.city-chip {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 12px;
  text-align: center; font: 600 0.85rem var(--font); color: var(--gray-700);
  cursor: pointer; transition: all 0.18s;
}
/* Pin icon inside city chips */
.chip-pin {
  font-size: 0.95rem;
  color: #e5453a;          /* standard map-pin red */
  transition: color 0.18s;
  flex-shrink: 0;
}
.city-chip:hover  { border-color: var(--blue-500); background: var(--blue-50); }
.city-chip:hover  .chip-pin { color: var(--blue-600); }
.city-chip.selected { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700); }
.city-chip.selected .chip-pin { color: var(--blue-600); }

.selected-city-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 24px 16px;
  background: var(--green-50); border: 1.5px solid var(--green-100);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font: 600 0.9rem var(--font); color: var(--green-600);
}

/* ── Main App (screen-app) ────────────────────────────────────────────── */
.app-screen { position: absolute; top:0; left:0; right:0; bottom:0; }

.tab-panel {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 60px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--gray-50);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tab-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.tab-panel.active { display: block; animation: screenFadeIn 0.25s ease-out; }

/* ── Bottom Navigation ────────────────────────────────────────────────── */
.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px; background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex; align-items: center;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  z-index: 50;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--gray-400);
  font: 500 0.62rem var(--font); cursor: pointer; padding: 8px 4px;
  transition: color 0.18s; position: relative;
}
.nav-btn i { font-size: 1.1rem; transition: transform 0.18s; }
.nav-btn.active { color: var(--blue-600); }
.nav-btn.active i { transform: scale(1.1); }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  background: var(--red-600); color: var(--white);
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 0.55rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--white);
}

/* ── Tab: Home Header ─────────────────────────────────────────────────── */
.home-header {
  background: linear-gradient(165deg, #0b1d4e 0%, #1035a8 45%, #1e5cdd 100%);
  padding: 8px 18px 22px;
  color: var(--white);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  position: relative;
  margin: 0;
  box-shadow: 0 4px 20px rgba(11, 29, 78, 0.16);
}

.home-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.76rem;
  font-weight: 700;
}
.hsb-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  color: rgba(255, 255, 255, 0.85);
}

.home-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.header-actions { display: flex; gap: 8px; }

.greeting {
  font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 4px;
}
.location-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.15); border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.9); cursor: pointer;
  transition: background 0.18s;
}
.location-pill:hover { background: rgba(255,255,255,0.22); }

/* Severe banner inside header */
.severe-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--red-600); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 14px; animation: pulseBorder 1.8s ease-in-out infinite;
}
@keyframes pulseBorder {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.3); }
  50%      { box-shadow: 0 0 0 4px rgba(220,38,38,0.12); }
}
.severe-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.severe-banner-text { flex: 1; }
.severe-banner-text strong { display: block; font-size: 0.78rem; letter-spacing: 0.5px; }
.severe-banner-text span   { font-size: 0.72rem; opacity: 0.85; }
.severe-banner-close {
  background: none; border: none; color: var(--white);
  opacity: 0.7; cursor: pointer; font-size: 0.9rem; padding: 2px;
}

/* Current weather card */
.current-weather-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 4px 14px; margin-bottom: 4px;
}
.cw-temp { font-size: 3.4rem; font-weight: 900; color: var(--white); line-height: 1; }
.cw-condition { font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,0.95); margin: 4px 0 2px; }
.cw-feels { font-size: 0.78rem; color: rgba(255,255,255,0.7); }

/* Metrics row (inside the white card that pops out slightly) */
.metrics-row {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm); padding: 12px 6px;
  display: flex; justify-content: space-around; align-items: center;
}
.metric-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
}
.metric-item i    { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.metric-val  { font-size: 0.85rem; font-weight: 700; color: var(--white); }
.metric-lbl  { font-size: 0.65rem; color: rgba(255,255,255,0.6); }
.metric-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.2); }

/* ── For You Section ──────────────────────────────────────────────────── */
.for-you-section { padding: 18px 18px 120px; }

.section-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.section-title { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.section-sub   { font-size: 0.75rem; color: var(--gray-500); margin-top: 2px; }

/* Severe override card */
.severe-override-card {
  background: var(--red-50); border: 2px solid #fca5a5;
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px;
}
.soc-header {
  background: var(--red-600); color: var(--white);
  padding: 10px 14px; font: 700 0.78rem var(--font);
  display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px;
}
.soc-body { padding: 14px 14px 10px; }
.soc-body strong { font-size: 0.95rem; color: var(--red-700); display: block; margin-bottom: 6px; }
.soc-body p { font-size: 0.82rem; color: var(--red-700); line-height: 1.5; }
.soc-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-top: 1px solid #fecaca;
}
.soc-badge {
  background: var(--red-600); color: var(--white);
  border-radius: var(--radius-full); padding: 3px 12px; font: 700 0.72rem var(--font);
}

/* Recommendation cards */
.rec-card {
  background: var(--white); border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200); padding: 16px;
  margin-bottom: 12px; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.rec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rec-card:active { transform: scale(0.98); }

.rec-card-header {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.rec-card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.rec-card-title-area { flex: 1; }
.rec-card-title-area h4 { font-size: 0.97rem; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
.rec-card-title-area .rec-subtitle { font-size: 0.78rem; color: var(--gray-500); }
.rec-rank-badge {
  background: var(--blue-50); color: var(--blue-700);
  border-radius: var(--radius-full); padding: 3px 10px;
  font: 700 0.72rem var(--font); white-space: nowrap;
  border: 1px solid var(--blue-100);
}

.rec-detail-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.rec-detail-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gray-100); border-radius: var(--radius-full);
  padding: 4px 10px; font-size: 0.74rem; font-weight: 600; color: var(--gray-600);
}
.rec-detail-chip i { font-size: 0.7rem; }

.rec-status-row { display: flex; justify-content: space-between; align-items: center; }
.rec-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-full); padding: 5px 12px;
  font: 700 0.75rem var(--font);
}

.rec-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.rec-actions button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--radius-full); padding: 8px 12px;
  font: 600 0.76rem var(--font); cursor: pointer; border: 1px solid;
  transition: background 0.18s;
}
.btn-why-rec {
  background: var(--blue-50); color: var(--blue-700);
  border-color: var(--blue-100);
}
.btn-why-rec:hover { background: var(--blue-100); }
.btn-ai-explain {
  background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe;
}
.btn-ai-explain:hover { background: #ede9fe; }

/* Color themes for cards */
.theme-green .rec-card-icon  { background: var(--green-100); color: var(--green-600); }
.theme-green .rec-status-pill { background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-100); }

.theme-orange .rec-card-icon  { background: var(--orange-50); color: var(--orange-600); }
.theme-orange .rec-status-pill { background: var(--orange-50); color: var(--orange-600); border: 1px solid var(--orange-100); }

.theme-blue .rec-card-icon  { background: var(--blue-50); color: var(--blue-600); }
.theme-blue .rec-status-pill { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }

.theme-red .rec-card-icon  { background: var(--red-100); color: var(--red-600); }
.theme-red .rec-status-pill { background: var(--red-50); color: var(--red-700); border: 1px solid #fecaca; }

.theme-yellow .rec-card-icon  { background: var(--yellow-100); color: #854d0e; }
.theme-yellow .rec-status-pill { background: var(--yellow-100); color: #854d0e; border: 1px solid #fde047; }

/* Deprioritized style when severe alert active */
.rec-card.deprioritized {
  opacity: 0.55; position: relative;
}
.rec-card.deprioritized::after {
  content: 'Temporarily deprioritized';
  position: absolute; top: 8px; right: 8px;
  background: var(--gray-200); color: var(--gray-500);
  border-radius: var(--radius-full); padding: 2px 10px;
  font: 600 0.7rem var(--font);
}

/* Change persona row */
.change-persona-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 14px 16px;
  margin-top: 6px;
}
.change-persona-left {
  display: flex; align-items: center; gap: 12px;
}
.change-persona-left > i { font-size: 1.3rem; color: var(--blue-600); }
.cp-label { display: block; font-size: 0.72rem; color: var(--gray-500); }
.cp-name  { display: block; font-size: 0.92rem; font-weight: 700; color: var(--gray-900); }

/* ── Tab: Weather / Forecast ──────────────────────────────────────────── */
.tab-top-header {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 44px 20px 16px;
}
.tab-top-header h2 { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }
.tab-top-header p  { font-size: 0.82rem; color: var(--gray-500); margin-top: 4px; }

.section-card {
  background: var(--white); border-radius: var(--radius-md);
  margin: 12px 16px; padding: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.card-section-title {
  font-size: 0.88rem; font-weight: 700; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px;
}

.forecast-today-card {
  background: linear-gradient(135deg, #1e4fad, #2563eb);
  border-radius: var(--radius-md); margin: 12px 16px;
  padding: 20px; color: var(--white);
}
.ftc-row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ftc-temp { font-size: 2.8rem; font-weight: 900; }
.ftc-cond { font-size: 0.9rem; font-weight: 600; opacity: 0.9; }
.ftc-row2 { display: flex; gap: 20px; font-size: 0.82rem; }
.ftc-row2 span { display: flex; align-items: center; gap: 5px; opacity: 0.85; }

.hourly-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.hourly-scroll::-webkit-scrollbar { display: none; }

.hourly-item {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 12px 14px; border: 1px solid var(--gray-200);
  min-width: 64px;
}
.hourly-item.now { background: var(--blue-50); border-color: var(--blue-100); }
.h-time { font-size: 0.72rem; font-weight: 700; color: var(--gray-600); }
.h-icon { font-size: 1.35rem; }
.h-temp { font-size: 0.9rem; font-weight: 700; color: var(--gray-900); }
.h-rain { font-size: 0.68rem; font-weight: 600; color: var(--blue-600); }

.h-icon.sun   { color: #f59e0b; }
.h-icon.cloud { color: var(--gray-400); }
.h-icon.rain  { color: var(--blue-500); }
.h-icon.storm { color: #7c3aed; }

.five-day-list { display: flex; flex-direction: column; gap: 0; }
.five-day-item {
  display: flex; align-items: center;
  padding: 12px 4px; gap: 0; border-bottom: 1px solid var(--gray-100);
}
.five-day-item:last-child { border-bottom: none; }
.five-day-item.today-row .fd-day { font-weight: 700; color: var(--blue-600); }
.fd-day   { flex: 0 0 50px; font: 600 0.88rem var(--font); color: var(--gray-700); }
.fd-icon  { flex: 0 0 36px; font-size: 1.2rem; text-align: center; }
.fd-range { flex: 1; display: flex; gap: 8px; }
.fd-hi    { font: 700 0.88rem var(--font); color: var(--gray-900); }
.fd-lo    { font: 500 0.88rem var(--font); color: var(--gray-400); }
.fd-rain  { display: flex; align-items: center; gap: 4px; font: 600 0.8rem var(--font); color: var(--blue-500); }

.fd-icon.sun   { color: #f59e0b; }
.fd-icon.cloud { color: var(--gray-400); }
.fd-icon.rain  { color: var(--blue-500); }
.fd-icon.storm { color: #7c3aed; }

/* Forecast persona suitability */
#forecastPersonaContent { display: flex; flex-direction: column; gap: 8px; }
.fp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.fp-label { font-weight: 600; color: var(--gray-700); }
.fp-val   { font-weight: 700; }
.fp-good  { color: var(--green-600); }
.fp-warn  { color: var(--orange-600); }
.fp-bad   { color: var(--red-600); }

/* ── Tab: Alerts ──────────────────────────────────────────────────────── */
.no-alerts-card {
  background: var(--white); border-radius: var(--radius-md);
  margin: 12px 16px; padding: 28px;
  text-align: center; border: 1px solid var(--gray-200);
}
.no-alerts-icon { font-size: 3rem; color: var(--green-600); margin-bottom: 12px; }
.no-alerts-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.no-alerts-card p  { font-size: 0.85rem; color: var(--gray-500); }

.info-alert-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: #eff6ff; border: 1px solid var(--blue-100);
  border-radius: var(--radius-md); margin: 0 16px 16px; padding: 14px 16px;
}
.info-alert-icon { font-size: 1.2rem; color: var(--blue-600); flex-shrink: 0; margin-top: 1px; }
.info-alert-text strong { font-size: 0.88rem; font-weight: 700; color: var(--blue-800); }
.info-alert-text p      { font-size: 0.8rem; color: var(--blue-700); margin-top: 3px; }

.btn-simulate-severe {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 16px; padding: 14px;
  background: var(--white); border: 2px dashed var(--orange-600);
  border-radius: var(--radius-md); width: calc(100% - 32px);
  color: var(--orange-600); font: 700 0.9rem var(--font); cursor: pointer;
  transition: background 0.18s;
}
.btn-simulate-severe:hover { background: var(--orange-50); }

/* Severe alert hero */
.severe-alert-hero {
  background: linear-gradient(160deg, #7f1d1d, #dc2626);
  color: var(--white); padding: 32px 20px;
  text-align: center;
}
.sah-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin: 0 auto 16px;
  animation: pulseBorder 1.8s ease-in-out infinite;
}
.sah-badge {
  display: inline-block; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full); padding: 5px 14px;
  font: 700 0.72rem var(--font); letter-spacing: 0.5px; margin-bottom: 14px;
}
.sah-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.sah-sub   { font-size: 0.88rem; opacity: 0.9; }

.alert-detail-card {
  background: var(--white); border-radius: var(--radius-md);
  margin: 12px 16px; border: 1px solid var(--gray-200);
  overflow: hidden;
}
.adc-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100); gap: 12px;
}
.adc-row:last-child { border-bottom: none; }
.adc-label { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; flex-shrink: 0; min-width: 80px; }
.adc-val   { font-size: 0.85rem; font-weight: 600; color: var(--gray-900); text-align: right; }
.alert-red { color: var(--red-600); }
.severity-badge {
  display: inline-block; background: var(--red-50); color: var(--red-700);
  border-radius: var(--radius-full); padding: 3px 12px; font: 700 0.78rem var(--font);
}
.adc-source {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; background: var(--gray-50);
  font-size: 0.75rem; color: var(--gray-500); font-weight: 600;
}
.adc-source i { color: var(--blue-600); }

.safety-override-info {
  background: #fef3c7; border: 1px solid #fde68a;
  border-radius: var(--radius-md); margin: 0 16px 12px; padding: 14px 16px;
}
.soi-title {
  display: flex; align-items: center; gap: 8px;
  font: 700 0.85rem var(--font); color: #92400e; margin-bottom: 6px;
}
.safety-override-info p { font-size: 0.8rem; color: #78350f; line-height: 1.5; }

/* ── Tab: Map ─────────────────────────────────────────────────────────── */
.map-layer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.map-layer-bar::-webkit-scrollbar { display: none; }

.map-layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font: 600 0.78rem var(--font);
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.map-layer-btn:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.map-layer-btn.active {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
  box-shadow: 0 2px 8px rgba(30,96,241,0.25);
}

.mlb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.rain-dot   { background: #3b82f6; }
.alert-dot  { background: #ef4444; }
.clear-dot  { background: #10b981; }
.thunder-dot { background: #8b5cf6; }
.map-layer-btn.active .mlb-dot {
  background: var(--white);
}

.leaflet-map-wrap {
  height: 290px;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--blue-100);
  box-shadow: 0 4px 14px rgba(15, 37, 87, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #e5e9f0;
}

/* Custom Leaflet Map Pin */
.user-map-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.user-map-pin .pin-core {
  width: 14px;
  height: 14px;
  background: #1e60f1;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(30,96,241,0.7);
  animation: userPinPulse 1.8s infinite;
}
.user-map-pin .pin-tag {
  background: #1e60f1;
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  white-space: nowrap;
  margin-top: 3px;
}
@keyframes userPinPulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,96,241,0.8); }
  70%  { box-shadow: 0 0 0 12px rgba(30,96,241,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,96,241,0); }
}

/* City Map Pin */
.city-map-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.city-map-pin .pin-core {
  width: 10px;
  height: 10px;
  background: #64748b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.city-map-pin .pin-tag {
  background: rgba(255,255,255,0.92);
  color: #334155;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: nowrap;
  margin-top: 2px;
}

/* Zone Label Tooltip */
.zone-label-tooltip {
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
  font-family: var(--font) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  color: #1e293b !important;
}
.zone-label-tooltip.rain-tooltip { color: #1d4ed8 !important; border-color: #93c5fd !important; }
.zone-label-tooltip.alert-tooltip { color: #b91c1c !important; border-color: #fca5a5 !important; }
.zone-label-tooltip.clear-tooltip { color: #047857 !important; border-color: #6ee7b7 !important; }
.zone-label-tooltip.thunder-tooltip { color: #6d28d9 !important; border-color: #c4b5fd !important; }

.map-persona-note {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin: 0 16px 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}
.map-persona-note i { color: var(--blue-600); font-size: 0.95rem; flex-shrink: 0; }

.map-disclaimer {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  margin: 8px 16px 16px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--blue-700);
  line-height: 1.5;
  border-radius: var(--radius-md);
}
.map-disclaimer i { flex-shrink: 0; margin-top: 2px; }

.map-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.legend-item { display: flex; align-items: center; gap: 8px; font: 500 0.8rem var(--font); color: var(--gray-600); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.rain    { background: rgba(59,130,246,0.35); border: 1.5px solid #3b82f6; }
.legend-dot.clear   { background: rgba(16,185,129,0.35); border: 1.5px solid #10b981; }
.legend-dot.alert   { background: rgba(239,68,68,0.35);  border: 1.5px solid #ef4444; }
.legend-dot.thunder { background: rgba(139,92,246,0.35); border: 1.5px solid #8b5cf6; }
.legend-dot.loc     { background: #1e60f1; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.legend-dot.city    { background: #64748b; border-radius: 50%; }

/* ── Tab: Profile ─────────────────────────────────────────────────────── */
.profile-user-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: var(--white); padding: 32px 20px 22px; margin-bottom: 12px;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
}
.profile-info h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.profile-info p  { font-size: 0.82rem; opacity: 0.85; margin-bottom: 2px; }

.interests-tag-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.interest-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-full); padding: 5px 12px;
  font: 600 0.78rem var(--font); color: var(--blue-700);
}

.profile-actions { display: flex; flex-direction: column; gap: 0; }
.profile-action-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: none; border: none; text-align: left;
  padding: 15px 4px; cursor: pointer; border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.profile-action-btn:last-child { border-bottom: none; }
.profile-action-btn:hover { background: var(--gray-50); margin: 0 -4px; padding: 15px 8px; width: calc(100% + 8px); border-radius: var(--radius-sm); }
.profile-action-btn > i:first-child { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; background: var(--blue-50); color: var(--blue-600); }
.profile-action-btn > div { flex: 1; }
.profile-action-btn > div strong { display: block; font-size: 0.9rem; color: var(--gray-900); }
.profile-action-btn > div span   { font-size: 0.76rem; color: var(--gray-500); }
.profile-action-btn .caret { color: var(--gray-300); font-size: 0.8rem; }
.alert-orange { color: var(--orange-600) !important; }

.privacy-notice {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 16px 8px; padding: 12px 16px;
  background: var(--green-50); border: 1px solid var(--green-100);
  border-radius: var(--radius-sm); font-size: 0.76rem; color: var(--green-600); font-weight: 500;
}
.privacy-notice i { flex-shrink: 0; }

.app-version {
  text-align: center; font-size: 0.7rem; color: var(--gray-300);
  padding: 8px 16px 80px; letter-spacing: 0.5px;
}

/* ── Modals / Bottom Sheets ───────────────────────────────────────────── */
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.45); z-index: 200;
  display: flex; align-items: flex-end;
  backdrop-filter: blur(2px);
  animation: backdropFadeIn 0.2s ease-out;
}
@keyframes backdropFadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

.bottom-sheet {
  background: var(--white); border-radius: 24px 24px 0 0;
  width: 100%; max-height: 90%; overflow-y: auto;
  padding: 8px 20px 32px;
  animation: sheetSlideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes sheetSlideUp {
  from { transform: translateY(40%); opacity: 0.6; }
  to   { transform: translateY(0);   opacity: 1; }
}

.sheet-handle {
  width: 36px; height: 4px; background: var(--gray-200);
  border-radius: 2px; margin: 10px auto 16px;
}
.sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.sheet-header h3 { font-size: 1.05rem; font-weight: 800; color: var(--gray-900); }
.sheet-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-100); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-600); font-size: 0.85rem;
  transition: background 0.18s;
}
.sheet-close-btn:hover { background: var(--gray-200); }
.sheet-sub { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 16px; line-height: 1.45; }

.concept-callout {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-md); padding: 14px; margin-top: 14px;
}
.concept-callout i { color: #f59e0b; font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.concept-callout strong { font-size: 0.88rem; color: var(--blue-900); display: block; margin-bottom: 3px; }
.concept-callout p { font-size: 0.78rem; color: var(--blue-800); line-height: 1.4; }

/* Why This modal */
.why-rec-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px;
}
.why-rec-card .mini-icon { font-size: 1.4rem; margin-bottom: 6px; }
.why-rec-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); }
.why-rec-card p  { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }

.why-section-label { font: 700 0.78rem var(--font); color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px; }

.scoring-table { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.score-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--gray-50); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}
.score-row-left { display: flex; align-items: center; gap: 10px; font: 600 0.85rem var(--font); color: var(--gray-700); }
.score-row-left i { font-size: 0.95rem; color: var(--blue-600); width: 16px; }
.score-pts { font: 800 0.9rem var(--font); color: var(--green-600); }

.score-total-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--blue-50); border: 1.5px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
  font: 700 0.9rem var(--font); color: var(--gray-900);
}
.score-total-right { display: flex; align-items: center; gap: 10px; }
.score-total-val { font-size: 1.15rem; font-weight: 900; color: var(--blue-700); }
.rank-badge {
  background: #fef3c7; color: #92400e;
  border-radius: var(--radius-full); padding: 4px 12px;
  font: 700 0.78rem var(--font); border: 1px solid #fde68a;
}

.explanation-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 14px; margin-bottom: 14px;
}
.exp-icon { font-size: 1.2rem; color: var(--blue-600); flex-shrink: 0; margin-top: 1px; }
.explanation-card p { font-size: 0.85rem; color: var(--gray-700); line-height: 1.55; font-weight: 500; }

.scoring-concepts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.concept-chip {
  border-radius: var(--radius-sm); padding: 12px;
  border: 1px solid var(--gray-200);
}
.concept-chip strong { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 3px; }
.concept-chip span { font-size: 0.72rem; color: var(--gray-500); line-height: 1.4; display: block; }
.concept-chip.scoring { background: #f0fdf4; border-color: var(--green-100); }
.concept-chip.scoring strong { color: var(--green-600); }
.concept-chip.ranking { background: #eff6ff; border-color: var(--blue-100); }
.concept-chip.ranking strong { color: var(--blue-600); }

/* AI Modal */
.ai-response-card {
  background: #f5f3ff; border: 1.5px solid #ddd6fe;
  border-radius: var(--radius-md); padding: 18px; margin-bottom: 14px;
}
.ai-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ai-chip {
  background: #7c3aed; color: var(--white);
  border-radius: var(--radius-full); padding: 3px 12px;
  font: 700 0.72rem var(--font);
}
.ai-note { font-size: 0.68rem; color: #8b5cf6; font-weight: 500; }
.ai-body { font-size: 0.9rem; color: #4c1d95; line-height: 1.6; font-weight: 500; margin-bottom: 14px; }
.ai-based-on strong { font-size: 0.78rem; color: #6d28d9; display: block; margin-bottom: 8px; }
.ai-factors { display: flex; flex-direction: column; gap: 5px; }
.ai-factor {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: #5b21b6; font-weight: 500;
}
.ai-factor i { color: #7c3aed; font-size: 0.8rem; }
.ai-disclaimer {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 12px;
  font-size: 0.74rem; color: var(--gray-500); line-height: 1.5;
}
.ai-disclaimer i { flex-shrink: 0; margin-top: 1px; }

/* Toast */
.toast-wrap { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  background: var(--gray-900); color: var(--white);
  padding: 9px 18px; border-radius: var(--radius-full);
  font: 600 0.8rem var(--font); white-space: nowrap;
  animation: toastIn 0.25s ease-out, toastOut 0.3s ease-in 2.2s forwards;
  box-shadow: var(--shadow-lg);
}
@keyframes toastIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(4px); } }

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }
