/* ============================================================
   Fim de Semana — Premium Family Experience Design System
   Apple-quality warmth meets Kidadl vibrancy + Airbnb polish
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Warm cream palette */
  --bg: #FDF8F3;
  --bg-warm: #FBF6EF;
  --bg-tinted: #FAF4EB;
  --surface: #FFFFFF;
  --surface-hover: #FFFDF9;
  --border: rgba(0,0,0,0.06);
  --separator: rgba(60,60,67,0.06);

  /* Text — rich warm blacks */
  --text: #1C1917;
  --text-secondary: #78716C;
  --text-tertiary: #A8A29E;

  /* Brand accent — vivid warm green */
  --accent: #16A34A;
  --accent-dark: #15803D;
  --accent-light: #22C55E;
  --accent-bg: rgba(22,163,74,0.08);
  --accent-glow: rgba(22,163,74,0.2);

  /* Event type gradients — vibrant + warm */
  --grad-feira: linear-gradient(135deg, #16A34A 0%, #4ADE80 100%);
  --grad-gastronomia: linear-gradient(135deg, #EA580C 0%, #FB923C 100%);
  --grad-natureza: linear-gradient(135deg, #0D9488 0%, #2DD4BF 100%);
  --grad-cultura: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
  --grad-festival: linear-gradient(135deg, #DB2777 0%, #F472B6 100%);
  --grad-mercado: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
  --grad-outro: linear-gradient(135deg, #78716C 0%, #A8A29E 100%);

  /* Type solid colors */
  --color-feira: #16A34A;
  --color-gastronomia: #EA580C;
  --color-natureza: #0D9488;
  --color-cultura: #7C3AED;
  --color-festival: #DB2777;
  --color-mercado: #2563EB;
  --color-outro: #78716C;

  /* Type light backgrounds */
  --bg-feira: rgba(22,163,74,0.06);
  --bg-gastronomia: rgba(234,88,12,0.06);
  --bg-natureza: rgba(13,148,136,0.06);
  --bg-cultura: rgba(124,58,237,0.06);
  --bg-festival: rgba(219,39,119,0.06);
  --bg-mercado: rgba(37,99,235,0.06);
  --bg-outro: rgba(120,113,108,0.06);

  /* Semantic */
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-bg: rgba(245,158,11,0.1);
  --amber-bg-rich: rgba(245,158,11,0.14);
  --red: #EF4444;
  --red-bg: rgba(239,68,68,0.08);
  --green-soft: #22C55E;
  --green-bg: rgba(34,197,94,0.08);

  /* Shadows — warmer tones */
  --shadow-xs: 0 1px 2px rgba(28,25,23,0.04);
  --shadow-sm: 0 1px 3px rgba(28,25,23,0.06), 0 1px 2px rgba(28,25,23,0.04);
  --shadow-md: 0 4px 12px rgba(28,25,23,0.07), 0 2px 4px rgba(28,25,23,0.04);
  --shadow-lg: 0 10px 32px rgba(28,25,23,0.1), 0 4px 8px rgba(28,25,23,0.05);
  --shadow-xl: 0 20px 50px rgba(28,25,23,0.12), 0 8px 16px rgba(28,25,23,0.06);
  --shadow-glow-green: 0 4px 20px rgba(22,163,74,0.25);
  --shadow-glow-green-lg: 0 8px 32px rgba(22,163,74,0.3);

  /* Layout */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 100px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding-bottom: 96px;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ============================================================
   Tab Bar — Premium Frosted Glass
   ============================================================ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(253,248,243,0.72);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  backdrop-filter: saturate(200%) blur(24px);
  border-top: 0.5px solid rgba(28,25,23,0.08);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 6px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 16px 2px;
  min-width: 64px;
  transition: color 0.25s ease, transform 0.15s ease;
  letter-spacing: 0.02em;
  font-family: inherit;
}

.tab-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active svg {
  transform: scale(1.08);
}

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

/* ============================================================
   Screens
   ============================================================ */
.screen {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 20px 24px;
}

.screen-header {
  padding: 56px 0 8px;
}

.screen-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.08;
  margin: 0;
  color: var(--text);
}

.screen-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 8px 0 0;
  font-weight: 400;
  line-height: 1.4;
}

/* ============================================================
   Location Bar — Search Bar Style
   ============================================================ */
.location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
  position: relative;
  transition: box-shadow 0.2s ease;
}

.location-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28,25,23,0.06);
  pointer-events: none;
}

.location-bar:hover {
  box-shadow: var(--shadow-md);
}

.location-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-pin {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(22,163,74,0.12) 0%, rgba(22,163,74,0.06) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location-pin svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.location-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.location-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.location-change-btn {
  background: var(--accent-bg);
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  transition: all 0.2s ease;
}

.location-change-btn:hover {
  background: rgba(22,163,74,0.14);
  transform: scale(1.02);
}

.location-change-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   Discover CTA — Vibrant Green Gradient with Glow
   ============================================================ */
.discover-cta {
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 50%, #4ADE80 100%);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin: 0 0 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(22,163,74,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.discover-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.discover-cta::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -25%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.discover-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(22,163,74,0.35), 0 0 0 1px rgba(255,255,255,0.15) inset;
}

.discover-cta:active {
  transform: translateY(-1px);
}

.discover-cta h3 {
  color: white;
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.discover-cta p {
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.discover-cta .discover-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.discover-cta .discover-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.last-crawl-info {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: -14px;
  margin-bottom: 18px;
}

/* ============================================================
   Event Cards — Rich Visual Headers with Large Emoji
   ============================================================ */
.event-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.event-card:nth-child(1) { animation-delay: 0s; }
.event-card:nth-child(2) { animation-delay: 0.06s; }
.event-card:nth-child(3) { animation-delay: 0.12s; }
.event-card:nth-child(4) { animation-delay: 0.18s; }
.event-card:nth-child(5) { animation-delay: 0.24s; }
.event-card:nth-child(6) { animation-delay: 0.30s; }
.event-card:nth-child(7) { animation-delay: 0.36s; }
.event-card:nth-child(8) { animation-delay: 0.42s; }
.event-card:nth-child(9) { animation-delay: 0.48s; }
.event-card:nth-child(10) { animation-delay: 0.54s; }

.event-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 1;
}

.event-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.event-card:active {
  transform: translateY(-1px) scale(0.985);
}

/* Card gradient header — large visual area */
.card-gradient {
  padding: 18px 20px 16px;
  color: white;
  position: relative;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

/* Decorative pattern overlay on gradient headers */
.card-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.card-gradient::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Large emoji icon in card header */
.card-gradient .card-emoji {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  position: relative;
  z-index: 1;
}

.card-gradient-feira { background: var(--grad-feira); }
.card-gradient-gastronomia { background: var(--grad-gastronomia); }
.card-gradient-natureza { background: var(--grad-natureza); }
.card-gradient-cultura { background: var(--grad-cultura); }
.card-gradient-festival { background: var(--grad-festival); }
.card-gradient-mercado { background: var(--grad-mercado); }
.card-gradient-outro { background: var(--grad-outro); }

.card-type-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-type-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
}

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

.card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
  line-height: 1.25;
  color: var(--text);
}

.card-location {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.card-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-bg);
  color: var(--accent);
}

.card-distance.far {
  background: var(--amber-bg);
  color: #B45309;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-stars {
  color: var(--amber);
  font-size: 16px;
  letter-spacing: 2px;
}

.pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-tertiary);
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.pin-btn:hover {
  background: rgba(28,25,23,0.04);
  transform: scale(1.08);
}

.pin-btn.active {
  color: var(--accent);
}

.pin-btn.active:hover {
  background: var(--accent-bg);
}

/* ============================================================
   Event Grid — Responsive Columns
   ============================================================ */
.event-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 540px) {
  .event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 960px) {
  .event-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ============================================================
   Badges — Soft Vibrant Capsules
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.badge-feira { background: rgba(22,163,74,0.1); color: var(--color-feira); }
.badge-gastronomia { background: rgba(234,88,12,0.1); color: var(--color-gastronomia); }
.badge-natureza { background: rgba(13,148,136,0.1); color: var(--color-natureza); }
.badge-cultura { background: rgba(124,58,237,0.1); color: var(--color-cultura); }
.badge-festival { background: rgba(219,39,119,0.1); color: var(--color-festival); }
.badge-mercado { background: rgba(37,99,235,0.1); color: var(--color-mercado); }
.badge-outro { background: rgba(120,113,108,0.1); color: var(--color-outro); }

.badge-score {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.badge-score-high { background: rgba(34,197,94,0.14); color: #15803D; }
.badge-score-mid { background: var(--amber-bg); color: #B45309; }
.badge-score-low { background: rgba(120,113,108,0.1); color: #57534E; }

/* ============================================================
   Tags
   ============================================================ */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-tinted);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================================
   Buttons — Rounded with Glow
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 52px;
  letter-spacing: -0.1px;
  font-family: inherit;
  position: relative;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-green-lg);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(22,163,74,0.2);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
  border-radius: 10px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  border-radius: 12px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(28,25,23,0.05);
}

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

.btn-icon.active {
  color: var(--accent);
  background: var(--accent-bg);
}

/* ============================================================
   Filter Pills — Capsule Style with Shadow
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(28,25,23,0.08);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  min-height: 40px;
  box-shadow: var(--shadow-xs);
  transition: all 0.25s ease;
  font-family: inherit;
}

.filter-pill:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(28,25,23,0.12);
}

.filter-pill:active {
  transform: scale(0.95);
}

.filter-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(22,163,74,0.25);
  font-weight: 700;
}

/* ============================================================
   Segmented Control — iOS-style
   ============================================================ */
.segmented-control {
  display: flex;
  background: rgba(120,113,108,0.08);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 24px;
}

.segmented-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 40px;
  font-family: inherit;
  text-align: center;
}

.segmented-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(28,25,23,0.1), 0 1px 2px rgba(28,25,23,0.06);
  font-weight: 700;
}

/* ============================================================
   Forms — Large Inputs with Focus Ring
   ============================================================ */
.form-group { margin-bottom: 22px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(28,25,23,0.08);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  min-height: 52px;
  box-shadow: var(--shadow-xs);
  transition: all 0.25s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.12), var(--shadow-sm);
}

/* ============================================================
   Calendar — Clean Grid
   ============================================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.calendar-header {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  color: var(--text);
  min-height: 44px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.calendar-day:hover {
  background: rgba(28,25,23,0.04);
}

.calendar-day.today {
  font-weight: 800;
  color: white;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}

.calendar-day.other-month {
  color: var(--text-tertiary);
  opacity: 0.5;
}

.calendar-day.weekend {
  background: rgba(245,158,11,0.04);
  color: var(--text);
  font-weight: 600;
}

.calendar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  bottom: 5px;
}

.calendar-day.today .calendar-dot { background: white; }

/* ============================================================
   Overlay / Bottom Sheet — Frosted Backdrop
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.4);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlay-in 0.25s ease-out;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-panel {
  background: var(--bg-warm);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 768px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 12px 24px 40px;
  animation: sheet-up 0.45s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-xl);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.overlay-handle {
  width: 40px;
  height: 5px;
  background: rgba(28,25,23,0.12);
  border-radius: 3px;
  margin: 6px auto 24px;
}

/* ============================================================
   Detail Sections — Magazine-style
   ============================================================ */
.detail-section {
  padding: 24px 0;
}

.detail-section + .detail-section {
  border-top: 1px solid var(--separator);
}

.detail-section h3 {
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   AI Cards — Warm Green Tinted
   ============================================================ */
.ai-card {
  background: linear-gradient(135deg, rgba(22,163,74,0.06) 0%, rgba(74,222,128,0.04) 100%);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  border-left: 4px solid var(--accent);
  position: relative;
}

.ai-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22,163,74,0.08);
  pointer-events: none;
}

.ai-card-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-card-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

/* ============================================================
   Kid Tip Cards — Warm Amber
   ============================================================ */
.kid-tip {
  background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(251,191,36,0.06) 100%);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--amber);
  position: relative;
}

.kid-tip::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245,158,11,0.1);
  pointer-events: none;
}

.kid-tip-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   Stars — Large Amber
   ============================================================ */
.star-rating {
  display: inline-flex;
  gap: 6px;
}

.star-rating .star {
  font-size: 30px;
  color: rgba(28,25,23,0.08);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
  line-height: 1;
}

.star-rating .star.filled {
  color: var(--amber);
  filter: drop-shadow(0 1px 3px rgba(245,158,11,0.3));
}

.star-rating .star:hover {
  color: var(--amber);
  transform: scale(1.2);
}

/* ============================================================
   Spinner
   ============================================================ */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(28,25,23,0.06);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

/* ============================================================
   Toast — Dark Pill Capsule
   ============================================================ */
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28,25,23,0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  animation: toast-in 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 48px);
  text-align: center;
  letter-spacing: -0.1px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ============================================================
   Banner
   ============================================================ */
.banner {
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ============================================================
   Toggle / Chips / Sortable
   ============================================================ */
.toggle {
  position: relative;
  width: 51px;
  height: 31px;
  background: rgba(120,113,108,0.16);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.toggle.active { background: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.toggle.active::after { transform: translateX(20px); }

.chip-container { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(28,25,23,0.08);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}

.chip:hover {
  box-shadow: var(--shadow-sm);
}

.chip:active { transform: scale(0.95); }

.chip.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(22,163,74,0.2);
}

.sortable-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: grab;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(28,25,23,0.05);
  transition: box-shadow 0.2s ease;
}

.sortable-item:hover {
  box-shadow: var(--shadow-sm);
}

.sortable-handle { color: var(--text-tertiary); }

input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ============================================================
   Search Result & Plan Cards
   ============================================================ */
.search-result-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(28,25,23,0.05);
  transition: all 0.25s ease;
}

.search-result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.plan-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.plan-slot { padding: 16px 0; }
.plan-slot + .plan-slot { border-top: 1px solid var(--separator); }

.plan-slot-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.plan-slot-content { font-size: 15px; line-height: 1.6; }

/* ============================================================
   Back Button
   ============================================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.back-btn:active { opacity: 0.5; }

.back-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   Calendar Side Panel
   ============================================================ */
.calendar-side {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

/* ============================================================
   Empty State — Large Emoji + Warm Text
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 72px 36px;
  color: var(--text-secondary);
}

.empty-state .empty-emoji {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.empty-state p {
  margin: 8px 0 28px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Offline Banner
   ============================================================ */
.offline-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(245,158,11,0.06) 100%);
  padding: 12px 20px;
  text-align: center;
  font-size: 13px;
  color: #B45309;
  font-weight: 600;
  display: none;
}

.offline-banner.show { display: block; }

/* ============================================================
   Recommend CTA
   ============================================================ */
.recommend-cta {
  position: sticky;
  bottom: 96px;
  padding: 16px 0 4px;
  background: linear-gradient(transparent 0%, var(--bg) 40%);
  z-index: 10;
}

/* ============================================================
   Disclosure
   ============================================================ */
.disclosure-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 12px 0;
  font-family: inherit;
  transition: opacity 0.15s;
}

.disclosure-btn:active { opacity: 0.5; }

.disclosure-content {
  padding: 18px 22px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 8px;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(28,25,23,0.04);
}

/* ============================================================
   NEW: Hero Detail — Large gradient area for event detail
   ============================================================ */
.hero-detail {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: white;
}

.hero-detail::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 0%, transparent 80%);
  pointer-events: none;
}

.hero-detail::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-detail .hero-emoji {
  font-size: 52px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  position: relative;
  z-index: 1;
}

.hero-detail .hero-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-detail .hero-subtitle {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ============================================================
   NEW: Section Card — Grouped card container for detail
   ============================================================ */
.section-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 22px 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(28,25,23,0.04);
}

.section-card h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}

/* ============================================================
   NEW: Event Meta Row — Metadata pills
   ============================================================ */
.event-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.event-meta-row .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-tinted);
  color: var(--text-secondary);
  border: 1px solid rgba(28,25,23,0.04);
}

.event-meta-row .meta-pill .meta-icon {
  font-size: 16px;
  line-height: 1;
}

/* ============================================================
   NEW: Info Grid — 2-column practical info layout
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(28,25,23,0.04);
}

.info-item .info-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.info-item .info-content {
  flex: 1;
  min-width: 0;
}

.info-item .info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.info-item .info-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* ============================================================
   NEW: Map Container
   ============================================================ */
.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 200px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  position: relative;
  background: var(--bg-tinted);
}

.map-container iframe,
.map-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   NEW: Share Button — WhatsApp Style
   ============================================================ */
.share-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: #25D366;
  color: white;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 52px;
  font-family: inherit;
}

.share-btn-whatsapp:hover {
  background: #22C35E;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.35);
}

.share-btn-whatsapp:active {
  transform: translateY(0);
}

/* ============================================================
   NEW: Nearby Section — Horizontal scroll
   ============================================================ */
.nearby-section {
  margin: 0 -20px;
  padding: 0 20px;
}

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

.nearby-section .nearby-scroll::-webkit-scrollbar { display: none; }

.nearby-section .nearby-scroll .event-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: start;
}

/* ============================================================
   Animations — Staggered Fade-in-Up
   ============================================================ */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-in {
  animation: fade-in-up 0.5s cubic-bezier(0.32, 0.72, 0, 1) both;
}

.animate-in-scale {
  animation: fade-in-scale 0.5s cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* Stagger utility classes */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ============================================================
   Desktop / Responsive
   ============================================================ */
@media (min-width: 768px) {
  .screen { padding: 0 32px 36px; }
  .screen-title { font-size: 40px; letter-spacing: -1.2px; }

  .tab-bar {
    max-width: 420px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -4px 20px rgba(28,25,23,0.05);
  }

  .overlay-panel {
    max-width: 640px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .hero-detail {
    min-height: 160px;
  }

  .info-grid {
    gap: 16px;
  }
}

@media (max-width: 539px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Focus Visible — Accessibility
   ============================================================ */
:focus-visible {
  outline: 3px solid rgba(22,163,74,0.4);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible,
.filter-pill:focus-visible,
.chip:focus-visible {
  outline: 3px solid rgba(22,163,74,0.4);
  outline-offset: 2px;
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Card Hero — Large Gradient Top (for eventCard.js)
   ============================================================ */
.card-hero {
  padding: 20px 16px 16px;
  color: white;
  position: relative;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.card-hero-feira { background: var(--grad-feira); }
.card-hero-gastronomia { background: var(--grad-gastronomia); }
.card-hero-natureza { background: var(--grad-natureza); }
.card-hero-cultura { background: var(--grad-cultura); }
.card-hero-festival { background: var(--grad-festival); }
.card-hero-mercado { background: var(--grad-mercado); }
.card-hero-outro { background: var(--grad-outro); }

.card-hero-emoji { font-size: 36px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.card-hero-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.9; }
.card-hero-badge { position: absolute; top: 10px; left: 12px; background: rgba(255,255,255,0.25); backdrop-filter: blur(8px); padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; color: white; }

.card-pin-btn {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.15); border: none; cursor: pointer;
  padding: 8px; border-radius: 10px; min-width: 38px; min-height: 38px; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.card-pin-btn:hover { background: rgba(0,0,0,0.25); }
.card-pin-btn.active { background: rgba(255,255,255,0.3); }

.card-content { padding: 14px 16px 16px; }
.card-desc { font-size: 13px; line-height: 1.45; color: var(--text-secondary); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.card-meta-item { font-size: 12px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 3px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; }
.card-bottom-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-bottom-right { display: flex; align-items: center; }
.card-cost { font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: 2px 8px; background: var(--bg); border-radius: 100px; }
.card-kid { font-size: 14px; }
.card-attended { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-bg); padding: 2px 8px; border-radius: 100px; }

/* Detail Hero (for renderEvento) */
.hero-detail-feira { background: var(--grad-feira); }
.hero-detail-gastronomia { background: var(--grad-gastronomia); }
.hero-detail-natureza { background: var(--grad-natureza); }
.hero-detail-cultura { background: var(--grad-cultura); }
.hero-detail-festival { background: var(--grad-festival); }
.hero-detail-mercado { background: var(--grad-mercado); }
.hero-detail-outro { background: var(--grad-outro); }
.hero-detail-emoji { font-size: 48px; margin-bottom: 8px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15)); }
.hero-detail-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.9; }

/* Section title */
.section-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--text); letter-spacing: -0.2px; }

/* Info grid value */
.info-icon { font-size: 18px; margin-bottom: 4px; }
.info-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.info-value { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ============================================================
   Timeline Sections — Descobrir screen
   ============================================================ */
.timeline-section {
  margin-bottom: 32px;
}

.timeline-section:first-child {
  margin-top: 4px;
}

.timeline-header {
  margin-bottom: 14px;
  position: relative;
}

.timeline-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 2px;
  color: var(--text);
  line-height: 1.25;
}

.timeline-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

.timeline-count {
  position: absolute;
  top: 4px;
  right: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface);
  padding: 2px 10px;
  border-radius: 100px;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.04));
  border: 0.5px solid var(--border, rgba(0,0,0,0.06));
}

/* Highlight the "happening now" section */
.timeline-section:first-child .timeline-title {
  color: var(--accent, #2B7A4B);
}

/* Add a subtle left border accent to the happening now section */
.timeline-section:first-child .timeline-header {
  padding-left: 14px;
  border-left: 3px solid var(--accent, #2B7A4B);
  border-radius: 2px;
}

/* ============================================================
   Search + Location Bar
   ============================================================ */
.search-location-bar {
  display: flex;
  gap: 8px;
  margin: 14px 0 10px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  min-height: 48px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
}

.search-input::placeholder { color: var(--text-tertiary); }

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s;
  font-family: inherit;
  min-height: 48px;
}

.location-btn:hover { background: var(--surface-hover); }
.location-btn:active { transform: scale(0.97); }

.location-btn svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* Events toolbar */
.events-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

.event-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.ai-ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}

.ai-ask-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
}

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

.ai-ask-btn svg { flex-shrink: 0; }

/* ============================================================
   Calendar — Enhanced with event dots & summary
   ============================================================ */
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cal-month-label {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}

.calendar-day.has-events {
  font-weight: 600;
}

.calendar-dots {
  display: flex;
  gap: 3px;
  position: absolute;
  bottom: 3px;
}

.cal-day-num {
  position: relative;
  z-index: 1;
}

/* Month event summary */
.cal-month-summary {
  margin-top: 24px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 0.5px solid var(--border);
}

.cal-summary-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.cal-event-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.cal-event-row:hover {
  background: rgba(0,0,0,0.03);
}

.cal-event-row:active {
  background: rgba(0,0,0,0.06);
}

.cal-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-event-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cal-event-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-date {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================================
   Mobile responsive tweaks
   ============================================================ */
@media (max-width: 390px) {
  .screen { padding: 0 14px 14px; }
  .screen-title { font-size: 28px; }
  .timeline-title { font-size: 17px; }
  .location-bar { padding: 12px 14px; }
  .discover-cta { padding: 16px 18px; }
  .card-content { padding: 12px 14px 14px; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .info-item { padding: 10px; }
  .filter-bar { gap: 6px; }
  .filter-pill { padding: 6px 14px; font-size: 13px; }
}

@media (max-width: 320px) {
  .screen-title { font-size: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .card-hero-emoji { font-size: 28px; }
}

/* ============================================================
   View Toggle — List / Map
   ============================================================ */
.view-toggle {
  display: flex;
  background: rgba(118,118,128,0.08);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 4px;
}

.view-toggle-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-secondary);
  min-width: 40px;
  min-height: 36px;
}

.view-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.view-toggle-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ============================================================
   Events Map — Full-width Leaflet Map
   ============================================================ */
.events-map {
  width: calc(100% + 40px);
  margin-left: -20px;
  height: calc(100dvh - 210px);
  min-height: 400px;
  border-radius: 0;
  z-index: 1;
}

@media (min-width: 768px) {
  .events-map {
    width: 100%;
    margin-left: 0;
    border-radius: var(--radius-lg);
    height: calc(100dvh - 240px);
  }
}

/* Search this area button */
.map-search-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--surface);
  color: var(--text);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s;
  white-space: nowrap;
}

.map-search-btn:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: var(--shadow-xl);
}

.map-search-btn:active {
  transform: translateX(-50%) translateY(0);
}

/* Map event preview card */
#map-event-preview {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 400px;
}

.map-preview-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  animation: fade-in 0.25s ease-out;
}

.map-preview-card:active {
  transform: scale(0.98);
}

.map-preview-hero {
  padding: 12px 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-preview-body {
  padding: 14px 16px;
}

.map-preview-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}

.map-preview-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.map-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.15);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Leaflet custom marker */
.event-marker {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% 50% 50% 0 !important;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border: 2px solid white;
  font-size: 16px;
  line-height: 1;
}

.event-marker span {
  transform: rotate(45deg);
  display: block;
}

/* Map wrapper needs relative positioning for the search btn */
#map-view {
  position: relative;
}

/* ============================================================
   Weekend Plan Grid
   ============================================================ */
.weekend-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.wp-day {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.wp-day-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wp-slot {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--separator);
}

.wp-slot:last-child { border-bottom: none; }

.wp-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 50px;
  padding-top: 2px;
}

.wp-activity {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

/* ============================================================
   Stay Verdict
   ============================================================ */
.stay-verdict {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.stay-yes {
  background: var(--accent-bg);
}

.stay-no {
  background: var(--bg);
}

.stay-verdict-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.stay-verdict-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.stay-verdict-reason {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* ============================================================
   Tips & Nearby Lists
   ============================================================ */
.tips-list,
.nearby-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-item,
.nearby-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  padding: 6px 0;
}

.tip-bullet {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.nearby-bullet {
  color: var(--text-tertiary);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   Full-screen Map — Mapa tab
   ============================================================ */
#screen-mapa {
  padding: 0 !important;
  max-width: none !important;
  position: relative;
}

.full-map {
  width: 100%;
  height: calc(100dvh - 72px);
  min-height: 400px;
}

#screen-mapa .map-search-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

#screen-mapa .map-search-btn:hover {
  box-shadow: var(--shadow-xl);
  transform: translateX(-50%) translateY(-1px);
}

#screen-mapa .map-search-btn svg {
  stroke: var(--accent);
}

#screen-mapa #map-event-preview {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 400px;
  z-index: 1000;
}

/* ============================================================
   Planos — Weekend Cards
   ============================================================ */
.weekend-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(28,25,23,0.06), 0 1px 3px rgba(28,25,23,0.04);
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.weekend-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28,25,23,0.05);
  pointer-events: none;
}

.weekend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28,25,23,0.08), 0 2px 6px rgba(28,25,23,0.04);
}

.weekend-card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--separator);
}

.weekend-card-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 4px;
}

.weekend-card-date {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0;
}

.weekend-card-this-week {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 8px;
  vertical-align: middle;
}

.weekend-card-events {
  padding: 12px 20px;
}

.weekend-card-events:empty {
  display: none;
}

.weekend-event-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--separator);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.weekend-event-mini:last-child {
  border-bottom: none;
}

.weekend-event-mini:hover {
  opacity: 0.75;
}

.weekend-event-mini .mini-emoji {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.weekend-event-mini .mini-info {
  flex: 1;
  min-width: 0;
}

.weekend-event-mini .mini-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekend-event-mini .mini-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.weekend-card-footer {
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weekend-available {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.weekend-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-bg);
  border: none;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.weekend-add-btn:hover {
  background: rgba(22,163,74,0.14);
  transform: scale(1.02);
}

.weekend-add-btn:active {
  transform: scale(0.97);
}

.planos-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.planos-empty p {
  font-size: 15px;
  line-height: 1.5;
  margin: 12px 0 0;
}

/* ============================================================
   Mais — Disclosure Sections
   ============================================================ */
.mais-section {
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.mais-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28,25,23,0.05);
  pointer-events: none;
}

.mais-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  transition: background 0.15s ease;
}

.mais-section-header:hover {
  background: rgba(28,25,23,0.02);
}

.mais-section-header:active {
  background: rgba(28,25,23,0.04);
}

.mais-section-header .disclosure-arrow {
  transition: transform 0.25s ease;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.mais-section-header.open .disclosure-arrow {
  transform: rotate(180deg);
}

.mais-section-content {
  padding: 0 20px 20px;
}

/* ============================================================
   Combined Filter Row — single scrollable row with separator
   ============================================================ */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-separator {
  width: 1px;
  height: 24px;
  background: rgba(28,25,23,0.1);
  flex-shrink: 0;
  margin: 0 4px;
}

/* ============================================================
   Header Location Pill
   ============================================================ */
.header-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent-bg);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-location:hover {
  background: rgba(22,163,74,0.14);
  transform: scale(1.02);
}

.header-location:active {
  transform: scale(0.97);
}

.header-location svg {
  stroke: var(--accent);
  flex-shrink: 0;
}

/* Google Calendar button */
.btn-gcal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  min-height: 44px;
  background: #4285F4;
  color: white;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(66,133,244,0.25);
  white-space: nowrap;
}

.btn-gcal:hover {
  background: #3367D6;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(66,133,244,0.3);
}

/* Small Google Calendar icon button for weekend cards */
.btn-gcal-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}

.btn-gcal-sm:hover {
  background: #E8F0FE;
  border-color: #4285F4;
}

/* ============================================================
   Login Screen
   ============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-screen.hidden { display: none; }

.login-card {
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.login-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.login-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
  color: var(--text);
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 32px;
  line-height: 1.5;
}

.google-signin-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 48px;
}

.login-footer {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Skeleton loading */
.skeleton-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 540px) {
  .skeleton-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.skeleton-hero {
  height: 80px;
  background: linear-gradient(135deg, #E8E4DE 0%, #D4CFC7 100%);
}

.skeleton-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: #E8E4DE;
}

.skeleton-pulse {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   Weekend Plan Inline — inside weekend cards
   ============================================================ */
.weekend-plan-inline {
  padding: 0 16px 12px;
  border-top: 0.5px solid var(--separator);
  margin-top: 4px;
}

.wpi-section {
  padding: 10px 0 6px;
}

.wpi-section + .wpi-section {
  border-top: 0.5px solid var(--separator);
}

.wpi-day-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.wpi-slot {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.wpi-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 52px;
  padding-top: 2px;
  flex-shrink: 0;
}

.wpi-stay {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin: 8px 0;
  background: var(--accent-bg);
  border-radius: 12px;
  align-items: flex-start;
}

.wpi-stay-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.wpi-stay-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.wpi-stay-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.wpi-stay-reason {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.wpi-carolina {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  margin: 6px 0;
  background: var(--amber-bg);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  align-items: flex-start;
}

.wpi-tip {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.wpi-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.wpi-route-btn:hover {
  background: var(--accent-bg);
}

/* Planear button style */
.weekend-plan-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(43,122,75,0.2);
  white-space: nowrap;
}

.weekend-plan-btn:hover {
  background: var(--accent-dark, #1E5E38);
  transform: translateY(-1px);
}

.weekend-plan-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ============================================================
   Link Grid — Booking, restaurants, etc.
   ============================================================ */
.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.link-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s;
  border: 0.5px solid transparent;
  cursor: pointer;
}

.link-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.link-card:active {
  transform: translateY(0);
}

.link-card-icon {
  font-size: 28px;
  line-height: 1;
}

.link-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.link-card-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.3;
}

.link-card-sm {
  padding: 12px 8px;
}

.link-card-sm .link-card-icon {
  font-size: 24px;
}

.link-card-sm .link-card-label {
  font-size: 12px;
}

@media (max-width: 390px) {
  .link-grid { grid-template-columns: 1fr 1fr; }
  .link-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ============================================================
   Plan Event Card — Rich inline event in weekend plans
   ============================================================ */
.plan-event-card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 0.5px solid var(--border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.plan-event-card:active {
  transform: scale(0.99);
}

.pec-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: white;
  position: relative;
}

.pec-header-feira { background: var(--grad-feira); }
.pec-header-gastronomia { background: var(--grad-gastronomia); }
.pec-header-natureza { background: var(--grad-natureza); }
.pec-header-cultura { background: var(--grad-cultura); }
.pec-header-festival { background: var(--grad-festival); }
.pec-header-mercado { background: var(--grad-mercado); }
.pec-header-outro { background: var(--grad-outro); }

.pec-emoji {
  font-size: 28px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
  flex-shrink: 0;
}

.pec-header-info {
  flex: 1;
  min-width: 0;
}

.pec-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pec-loc {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 1px;
}

.pec-badge {
  background: rgba(255,255,255,0.25);
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pec-body {
  padding: 14px 16px 16px;
}

.pec-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 10px;
}

.pec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pec-meta-item {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.pec-ai {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  padding: 8px 0;
  border-top: 0.5px solid var(--separator);
}

.pec-ai strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.pec-tip {
  color: var(--text-secondary);
  font-style: italic;
}

.pec-carolina {
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  background: var(--amber-bg);
  border-radius: 10px;
  margin: 8px 0;
  color: var(--text);
}

.pec-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 0.5px solid var(--separator);
}

.pec-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.15s;
  border: 0.5px solid transparent;
}

.pec-link:hover {
  background: var(--surface);
  border-color: var(--accent);
}

/* ============================================================
   Dashboard — Home screen
   ============================================================ */
.dash-section {
  margin-bottom: 28px;
}

.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 2px;
}

.dash-section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--text);
}

.dash-section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-tinted, var(--bg));
  padding: 2px 10px;
  border-radius: 100px;
}

.dash-section-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 2px 10px;
}

/* Horizontal scrollable card row */
.dash-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.dash-scroll::-webkit-scrollbar { display: none; }

.dash-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  scroll-snap-align: start;
  border: 0.5px solid var(--border);
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dash-card:active {
  transform: translateY(-1px) scale(0.98);
}

.dash-card-hero {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dash-hero-feira { background: var(--grad-feira); }
.dash-hero-gastronomia { background: var(--grad-gastronomia); }
.dash-hero-natureza { background: var(--grad-natureza); }
.dash-hero-cultura { background: var(--grad-cultura); }
.dash-hero-festival { background: var(--grad-festival); }
.dash-hero-mercado { background: var(--grad-mercado); }
.dash-hero-outro { background: var(--grad-outro); }

.dash-card-emoji {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.dash-card-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(255,255,255,0.3);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.dash-card-body {
  padding: 10px 12px 12px;
}

.dash-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.dash-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dash-card-tip {
  font-size: 11px;
  color: var(--amber-dark, #D97706);
  background: var(--amber-bg);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quick action buttons */
.dash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.dash-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}

.dash-action:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dash-action:active {
  transform: translateY(0);
}

.dash-action-icon {
  font-size: 24px;
}
