/* keep hover effect */
.weather-toggle:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 10px 30px rgba(32,49,71,0.18);
}

/* Weather icon button (single definition) */
.weather-icon-button {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20000;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(180deg,#ffffff,#f0f6ff);
  color: #203147;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(32,49,71,0.15);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform .3s ease, box-shadow .3s ease;
}
.weather-icon-button:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(247,166,0,0.4);
}

/* Weather styles copied to match exactly */
.weather-icon-button {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  font-size: 6em;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
  animation: float 3s ease-in-out infinite;
  background: #ffffff;
  border-radius: 50%;
  width: 64px;          /* was 56px */
  height: 64px;
  font-size: 2rem;    /* was 1.8rem */
  border-radius: 10px;
  padding: 0;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(32, 49, 71, 0.15);
  border: none;
}
.weather-icon-button:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(247, 166, 0, 0.4);
  background: #ffffff;
}
@keyframes float {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 20px)); }
}

/* ensure dashboard off-canvas behaviour (if not already present) */
.dashboard {
  position: fixed;
  right: -100%;
  top: 0;
  width: 70%;        /* increased width */
  max-width: 720px;  /* wider cap */
  height: 100%;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
  background: #ffffff;
  border: 2px solid #203147; /* requested border color */
  border-radius: 12px;        /* optional: keeps style consistent */
  box-shadow: -10px 0 24px rgba(32,49,71,0.15); /* soft side shadow */
  overflow: hidden;                         /* clip inner shimmer to radius */
  transition: right 0.5s ease;
  overflow-y: auto;
  z-index: 9998;

  /* hide scrollbar but allow scrolling */
  scrollbar-width: none;           /* Firefox */
}
/* WebKit (Chrome, Edge, Safari) */
.dashboard::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.dashboard.active { right: 0; }

@media (max-width: 1024px) {
  /* Make the off-canvas dashboard full viewport */
  .dashboard {
    position: fixed !important;
    inset: 0 !important;                 /* top/left/right/bottom 0 */
    width: 100vw !important;
    height: 100vh;                        /* fallback */
    height: 100dvh;                       /* modern dynamic vh */
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 30000 !important;

    /* use transform slide so 'right' rules don't interfere */
    right: auto !important;
    transition: transform .45s ease !important;
    transform: translateX(100%) !important;

    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dashboard::-webkit-scrollbar { width: 0; height: 0; display: none; }
  .dashboard.active { transform: translateX(0) !important; }

  /* Full-bleed content and tighter spacing on small screens */
  .dashboard-content {
    margin-top: 0 !important;
    padding: 12px !important;
    gap: 16px !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Hide section/card titles on small devices */
  .dashboard .section-header,
  .dashboard .section-header h2,
  .dashboard .date-label,
  .dashboard .card .card-title,
  .dashboard .card .title,
  .dashboard .card header,
  .dashboard .card h2,
  .dashboard .card h3,
  .dashboard .dashboard-title {
    display: none !important;
  }
}

/* Prevent background scroll when dashboard is open (modern browsers) */
@supports selector(body:has(.dashboard.active)) {
  body:has(.dashboard.active) { overflow: hidden !important; }
}

@media (max-width: 768px) {
  /* Ensure full-bleed content on smaller phones */
  .dashboard {
    padding: 12px;
  }
  .card {
    border-radius: 10px;
    padding: 16px;
  }
}

/* back button style (if not present) */
.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #ffffff;
  border: none;
  color: #203147;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(32, 49, 71, 0.1);
}
.back-button:hover {
  background: #f7a600;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(247,166,0,0.3);
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 1200px;
  width: 100%;
  margin-top: 60px;
}
.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(32, 49, 71, 0.08);
  animation: fadeIn 0.5s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(247, 166, 0, 0.15), rgba(247, 166, 0, 0.25), rgba(247, 166, 0, 0.15), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}
.wide-card { width: 100%; }
.current-weather { width: 100%; }

.card-sparkles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.sparkle { position: absolute; width: 4px; height: 4px; background: #f7a600; border-radius: 50%; opacity: 0; animation: sparkleFloat 4s ease-in-out infinite; }
.sparkle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { left: 80%; top: 30%; animation-delay: 1s; }
.sparkle:nth-child(3) { left: 40%; top: 60%; animation-delay: 2s; }
.sparkle:nth-child(4) { left: 90%; top: 70%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { left: 20%; top: 80%; animation-delay: 0.5s; }
.sparkle:nth-child(6) { left: 60%; top: 15%; animation-delay: 2.5s; }
@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
  50% { opacity: 0.6; transform: translateY(-20px) scale(1); }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.city { font-size: 1.3em; font-weight: 600; text-align: left; margin-bottom: 5px; position: relative; z-index: 1; }
.current-weather-content { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.weather-main { display: flex; align-items: center; gap: 20px; }
.temp { font-size: 3.5em; font-weight: 700; margin: 0; }
.icon { font-size: 4em; margin: 0; }
.condition { font-size: 1em; color: #203147; opacity: 0.7; margin-top: 5px; }
.details { display: flex; gap: 30px; align-items: center; }
.detail-item { display: flex; align-items: center; gap: 8px; font-size: 0.9em; }
.detail-icon { font-size: 1.3em; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; position: relative; z-index: 1; }
.section-header h2 { font-size: 1.4em; font-weight: 600; margin: 0; }
.date-label { font-size: 0.9em; color: #203147; opacity: 0.6; }

.hourly-forecast {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #f7a600 rgba(32, 49, 71, 0.1);
  position: relative; /* fixed */
  z-index: 1;         /* moved out */
}
.hourly-forecast::-webkit-scrollbar { height: 6px; }
.hourly-forecast::-webkit-scrollbar-track { background: rgba(32, 49, 71, 0.1); border-radius: 3px; }
.hourly-forecast::-webkit-scrollbar-thumb { background: #f7a600; border-radius: 3px; }
.hour-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 70px;
  padding: 15px 10px; background: #f5f5f5; border-radius: 15px; transition: all 0.3s ease; cursor: pointer;
}
.hour-item:hover {
  background: #203147; color: #ffffff; transform: translateY(-5px); box-shadow: 0 4px 15px rgba(32, 49, 71, 0.2);
}
.hour-item:hover .hour-time, .hour-item:hover .hour-rain { color: #ffffff; opacity: 0.8; }
.hour-time { font-size: 0.85em; color: #203147; opacity: 0.6; font-weight: 500; }
.hour-icon { font-size: 2em; }
.hour-temp { font-size: 1.1em; font-weight: 600; }
.hour-rain { font-size: 0.8em; color: #f7a600; }

.weekly-forecast { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  position: relative;  /* was: position: relative, z-index: 1; -> comma is invalid */
  z-index: 1;
}
.day-item {
  display: grid; grid-template-columns: 100px 80px 50px 1fr 80px; align-items: center; gap: 15px;
  padding: 15px; background: #f5f5f5; border-radius: 15px; transition: all 0.3s ease; cursor: pointer;
}
.day-item:hover {
  background: #203147; color: #ffffff; transform: translateX(5px); box-shadow: 0 4px 15px rgba(32, 49, 71, 0.2);
}
.day-item.active { background: #f7a600; color: #ffffff; box-shadow: 0 4px 15px rgba(247,166,0,0.3); }
.day-item:hover .day-date, .day-item.active .day-date { color: #ffffff; opacity: 0.8; }
.day-name { font-weight: 600; font-size: 1em; }
.day-date { font-size: 0.9em; color: #203147; opacity: 0.6; }
.day-icon { font-size: 2em; text-align: center; }
.temp-bar { display: flex; align-items: center; gap: 10px; flex: 1; }
.temp-low, .temp-high { font-size: 0.9em; min-width: 35px; }
.temp-low { color: #203147; opacity: 0.7; text-align: right; }
.temp-high { color: #f7a600; }
.day-item:hover .temp-low, .day-item.active .temp-low { color: #ffffff; opacity: 0.8; }
.day-item:hover .temp-high, .day-item.active .temp-high { color: #ffffff; }
.temp-range { position: relative; flex: 1; height: 6px; background: rgba(32, 49, 71, 0.1); border-radius: 3px; overflow: hidden; }
.day-item:hover .temp-range, .day-item.active .temp-range { background: rgba(255, 255, 255, 0.2); }
.temp-fill { position: absolute; height: 100%; background: linear-gradient(90deg, #203147, #f7a600); border-radius: 3px; }
.day-rain { font-size: 0.9em; color: #f7a600; text-align: right; }
.day-item:hover .day-rain, .day-item.active .day-rain { color: #ffffff; opacity: 0.9; }

@media (max-width: 768px) {
  .day-item { grid-template-columns: 80px 60px 40px 1fr 60px; gap: 10px; padding: 12px; }
  .section-header h2 { font-size: 1.2em; }
  .hour-item { min-width: 60px; }
}

/* Hourly: compact on mobile, smoother scroll */
@media (max-width: 480px) {
  .hourly-forecast {
    gap: 10px;
    padding: 8px 0;
    scroll-snap-type: x mandatory;
  }
  .hour-item {
    min-width: 56px;
    padding: 10px 8px;
    gap: 6px;
    scroll-snap-align: start;
  }
  .hour-time { font-size: 0.78em; }
  .hour-icon { font-size: 1.6em; }
  .hour-temp { font-size: 1em; }
  .hour-rain { font-size: 0.75em; }
}

/* Weekly 5-day: compact layout and allow wrap to two columns if narrow */
@media (max-width: 480px) {
  .weekly-forecast { gap: 10px; }

  /* Ensure 100% rain is fully visible */
  .day-item {
    display: grid;
    grid-template-columns: 84px 58px 40px 1fr 70px; /* last column wider (was 52px) */
    gap: 8px;
    padding: 12px;
    align-items: center;
  }

  .day-rain {
    font-size: 0.9em;         /* slightly larger for readability */
    color: #f7a600;
    text-align: right;
    white-space: nowrap;       /* keep “100%” on one line */
    overflow: visible;         /* avoid clipping */
  }

  /* Slightly tighten other columns to make space */
  .day-name { font-size: 0.9em; }
  .day-date { font-size: 0.8em; }
  .day-icon { font-size: 1.5em; }
  .temp-low, .temp-high { font-size: 0.8em; min-width: auto; }
  .temp-range { height: 5px; }
}

/* Ultra-small phones: stack day rows more tightly */
@media (max-width: 360px) {
  .day-item {
    grid-template-columns: 78px 54px 36px 1fr 46px;
    gap: 8px;
    padding: 10px;
  }
  .day-icon { font-size: 1.5em; }
  .temp-range { height: 4px; }
}

/* Section header: ensure date label fits on mobile */
@media (max-width: 480px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .section-header h2 { font-size: 1.1em; }
  .date-label { font-size: 0.85em; }
}

/* Dashboard: ensure content doesn’t overflow horizontally */
@media (max-width: 480px) {
  .dashboard-content {
    padding: 0 4px;
    width: 100%;
  }
  .card {
    padding: 18px;
    border-radius: 14px;
  }
}

/* Fix overlapping icon button rules: keep center-right and bubble side-by-side */
@media (max-width: 480px) {
  .weather-icon-container { right: 16px; gap: 8px; }
  .weather-icon-button {
    position: static;   /* follow the container flow */
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
  }
  .cta-text { max-width: 180px; transform: translateY(-8px); }
  .cta-text::after { top: calc(50% - 8px); }
}

/* --- Current Weather Dark Centered UI (dashboard) --- */
.card.current-weather {
  background: #203147;
  color: #fff;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 32px rgba(32,49,71,0.35);
}
.card.current-weather .city {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.4rem;
  text-align: center;
}
.current-weather-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.current-weather-content .weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.current-weather-content .icon {
  font-size: 5rem;
  line-height: 1;
}
.current-weather-content .temp {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: .5rem;
  color: #fff;
}
.current-weather-content .condition {
  font-size: 1.25rem;
  opacity: .9;
  color: #fff;
  margin: 0;
}
.current-weather-content .details {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.3);
}
.current-weather-content .detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  font-size: .9rem;
  color: #f0f4f8;
}
.current-weather-content .detail-icon {
  font-size: 2rem;
  line-height: 1;
}
@media (max-width:640px){
  .card.current-weather { padding: 1.5rem 1.25rem; }
  .current-weather-content .icon { font-size: 4rem; }
  .current-weather-content .temp { font-size: 2.6rem; }
  .current-weather-content .details { grid-template-columns: 1fr; }
  .current-weather-content .detail-item { flex-direction: row; justify-content: center; }
}

/* === Current weather UI fixes (icon free, city visible) === */
.card.current-weather {
  background: #203147;
  color: #fff;
  position: relative;
}

.card.current-weather .city {
  color: #fff;              /* force visible on dark bg */
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 1.2rem;
  text-align: center;
  white-space: normal;      /* allow wrapping */
  overflow: visible;
  z-index: 2;
}

.current-weather-content .weather-main .icon,
.current-weather .icon {
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  font-size: 4.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.current-weather-content .weather-main {
  gap: 1.2rem;
}

.current-weather-content .temp {
  font-size: 3.2rem;
  margin-bottom: .4rem;
}

.current-weather-content .condition {
  font-size: 1.1rem;
  opacity: .85;
}

/* details keep grid; ensure text readable */
.current-weather-content .details {
  border-top: 1px solid rgba(255,255,255,.25);
}

.current-weather-content .detail-item {
  color: #e9eef5;
}

.current-weather-content .detail-icon {
  color: #fff;
}

/* mobile tweak */
@media (max-width:640px){
  .current-weather-content .icon { font-size: 3.4rem; }
  .current-weather-content .temp { font-size: 2.4rem; }
  .card.current-weather .city { font-size: 1.3rem; }
}

/* Fix syntax + adjust weather icon size */
.weather-icon-button {
  width: 64px;        /* slightly larger */
  height: 64px;
  font-size: 2rem;    /* moderate size */
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(180deg,#ffffff,#f0f6ff);
  color: #203147;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(32,49,71,0.15);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Hide scrollbar but keep scrolling, avoid “sagad” overscroll */
.dashboard {
  overflow-y: auto;
  overscroll-behavior-y: contain;    /* no rubber-band to blank space */
  scroll-padding-bottom: 24px;       /* softer end */
  scrollbar-width: none;             /* Firefox */
  padding-bottom: 16px;              /* buffer so last card doesn’t touch edge */
}
.dashboard::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Prevent last item margins from creating extra blank space */
.dashboard-content > .card:last-child {
  margin-bottom: 0;
}

/* Contain shimmering so it doesn’t affect scroll size */
.card {
  overflow: hidden;                  /* already present but keep explicit */
  position: relative;
  contain: paint;                    /* isolate paint to avoid scroll growth */
}
.card::before {
  pointer-events: none;
  will-change: transform;
}

/* Center icon sizes - slightly smaller to match compact look */
.current-weather-content .icon {
  font-size: 5rem;    /* was 4.4rem */
}
@media (max-width:640px){
  .current-weather-content .icon { font-size: 4rem; } /* was 3.6rem */
}

/* Bottom-right container with icon on the far right and bubble to its left */
.weather-icon-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20000;
  display: flex;
  flex-direction: row-reverse; /* icon on right, bubble on left */
  align-items: center;
  gap: 12px;
}

/* Make the button flow inside the container (not fixed) */
.weather-icon-button {
  position: static;   /* override earlier fixed */
  transform: none;    /* override translateY(-50%) */
}

/* Bubble beside the icon, slightly raised */
.cta-text {
  position: relative;
  margin: 0;
  background: #203147;
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(32,49,71,0.25);
  font-size: 0.9rem;
  line-height: 1.2;
  opacity: 0.95;
  transform: translateY(-32px); /* raise more */
}
.cta-text::after {
  content: "";
  position: absolute;
  right: -8px;
  top: calc(50% - 20px);        /* keep the tail centered after lift */
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 8px solid #203147;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

@media (max-width: 480px) {
  .weather-icon-container { bottom: 16px; gap: 8px; }
  .cta-text { font-size: 0.85rem; max-width: 180px; transform: translateY(-22px); }
  .cta-text::after { top: calc(50% - 8px); }
}

/* off-canvas border */
.dashboard {
  border: 2px solid #203147;
  border-radius: 12px;
}

/* Center-right container on the side */
.weather-icon-container {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20000;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
}

/* Bubble beside the icon, lifted slightly */
.cta-text {
  position: relative;
  margin: 0;
  max-width: 220px;
  background: #203147;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(32,49,71,0.26);
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 500;
  opacity: 0.96;
  transform: translateY(-40px); /* lift bubble a bit */
  white-space: nowrap;          /* keep short message on one line */
}
.cta-text::after {
  content: "";
  position: absolute;
  right: -8px;                  /* tail points to icon */
  top: calc(50% - 16px);
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 8px solid #203147;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

/* Hover feedback (optional) */
.weather-icon-button:hover + .cta-text {
  box-shadow: 0 10px 24px rgba(32,49,71,0.32);
}

/* Hide utilities */
.weather-icon-button.hidden,
.cta-text.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

/* Hide both launchers when a dashboard is open */
.weather-icon-container.hidden,
.map-icon-container.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

/* Mobile refinements */
@media (max-width: 480px) {
  .weather-icon-container { right: 16px; gap: 8px; }
  .weather-icon-button { width: 56px; height: 56px; }
  .cta-text {
    max-width: 180px;
    font-size: 0.85rem;
    padding: 8px 12px;
    transform: translateY(-22px); /* fixed value */
  }
  .cta-text::after { top: calc(50% - 10px); }
}

/* Hide rain % on mobile (weekly + hourly) and tighten layout */
@media (max-width: 480px) {
  /* Weekly 5-day: remove last rain column */
  .day-item {
    grid-template-columns: 90px 70px 44px 1fr; /* dropped the rain column */
  }
  .day-rain { display: none !important; }

  /* Hourly: hide rain % */
  .hour-rain { display: none !important; }
}

/* Bubble as rounded rectangle (no tail) */
.cta-text {
  border-radius: 12px;      /* rounded corners */
}

.cta-text::after {
  display: none !important; /* remove speech tail */
}

/* === Restore back button on mobile: keep header, hide only titles === */
@media (max-width: 1024px) {
  /* Re-show the header container */
  .dashboard .section-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  /* Hide title texts only */
  .dashboard .section-header h1,
  .dashboard .section-header h2,
  .dashboard .section-header h3,
  .dashboard .date-label,
  .dashboard .dashboard-title,
  .dashboard .card .card-title,
  .dashboard .card header h1,
  .dashboard .card header h2,
  .dashboard .card header h3 {
    display: none !important;
  }

  /* Force the back button visible and above everything */
  .back-button {
    display: inline-flex !important;
    position: fixed !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 40000 !important;
  }
}

/* Mobile: dagdag top space para sa fixed back button (weather only) */
@media (max-width: 1024px) {
  .dashboard .dashboard-content {
    padding-top: calc(env(safe-area-inset-top) + 80px) !important; /* was 64px */
  }
  .back-button {
    top: max(12px, env(safe-area-inset-top) + 8px) !important;
    left: 14px !important;
  }
}

/* Extra-compact phones */
@media (max-width: 480px) {
  .dashboard .dashboard-content {
    padding-top: calc(env(safe-area-inset-top) + 72px) !important; /* was 56px */
  }
}

/* Map title: bigger, primary color, span in orange, small gap to embed */
.map-title,
.map-section .section-header h2 {
  color: #203147;
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem);
  margin: 12px 0 8px; /* push title down a bit; small gap before embed */
}

.map-title span,
.map-section .section-header h2 span {
  color: #f7a600; /* orange highlight */
}

/* Ensure the map sits right below the title with a tiny gap */
.map-embed,
.map-container,
.map-wrapper,
.map-section iframe {
  display: block;
  margin-top: 0; /* rely on the title’s margin-bottom for spacing */
  width: 100%;
  border: 0;
}

@media (max-width: 480px) {
  .map-title,
  .map-section .section-header h2 {
    font-size: 1.6rem;
    margin: 10px 0 6px;
  }
}

/* Hourly: fix invalid 'position: relative, z-index: 1;' */
.hourly-forecast {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #f7a600 rgba(32, 49, 71, 0.1);
  position: relative; /* fixed */
  z-index: 1;         /* moved out */
}

/* Mobile refinements: fix invalid translateY(-px) */
@media (max-width: 480px) {
  .weather-icon-container { right: 16px; gap: 8px; }
  .weather-icon-button { width: 56px; height: 56px; }
  .cta-text {
    max-width: 180px;
    font-size: 0.85rem;
    padding: 8px 12px;
    transform: translateY(-22px); /* fixed value */
  }
  .cta-text::after { top: calc(50% - 10px); }
}

/* Hide map title entirely */
.map-title,
.map-section .section-header h2 {
  display: none !important;
}

/* Disable hover effects on the weather icon */
.weather-icon-button { 
  transition: none !important;
  --wx-shadow: 0 6px 16px rgba(32,49,71,0.15);
  box-shadow: var(--wx-shadow);
}
.weather-icon-button:hover,
.weather-toggle:hover {
  transform: none !important;
  box-shadow: var(--wx-shadow) !important;
  filter: none !important;
  opacity: 1 !important;
}

/* Hide common bubble selectors */
.weather-bubble, [data-role="weather-bubble"], .bubble-text, #weatherBubble { display: none !important; }

.cta-text.hidden { display: none !important; }
.weather-icon-container.bubble-dismissed .cta-text {
  display: none;
}
.weather-icon-container.bubble-dismissed {
  box-shadow: none;
  background: transparent;
}

