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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0a1628;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  color: #ffffff;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 100% 30%, rgba(14, 165, 233, 0.28) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(37, 99, 235, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #0f2847 0%, #0a1628 50%, #071124 100%);
}

.hero {
  flex: 0 0 auto;
  text-align: center;
  padding: 4rem 1.5rem 1.5rem;
  padding-top: calc(3rem + env(safe-area-inset-top));
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.location {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.75);
}


  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 600;
  min-width: 44px;
  backdrop-filter: blur(8px);
}
.locate-btn:disabled {
  cursor: default;

  font-size: 6rem;
  line-height: 1;
  color: #ffffff;

  font-size: 3rem;
  color: rgba(255, 255, 255, 0.6);

  margin: 0;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.hero-high-low {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.sheet {
  flex: 1 1 auto;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 1.5rem 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
}

.scroll-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.hourly-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.75rem;
  margin: -0.75rem -0.75rem 1rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.hourly-strip::-webkit-scrollbar {
  display: none;
}

.hourly-cell {
  flex: 0 0 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.25rem;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  scroll-snap-align: start;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

.hourly-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.hourly-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: #60a5fa;
}

.hourly-temp {
  font-size: 1rem;
  font-weight: 600;
}

.hourly-precip {
  font-size: 0.65rem;
  color: #60a5fa;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-cell {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.9rem 0.5rem;
  text-align: center;
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.detail-label {
  margin: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.detail-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.detail-sub {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.daily-list {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.daily-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  min-height: 3rem;
}

.daily-row + .daily-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-day {
  flex: 0 0 3.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
}

.daily-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: #60a5fa;
}

.daily-precip {
  flex: 0 0 2.5rem;
  font-size: 0.75rem;
  color: #60a5fa;
  text-align: right;
}

.daily-temps {
  flex: 0 0 4rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.daily-low {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.radar-section {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

#radar-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

#map {
  width: 100%;
  height: 280px;
  border-radius: 0.75rem;
  background: #0a1628;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 1.3rem !important;
}

.radar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.radar-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 1.1rem;
  border: none;
  border-radius: 0.75rem;
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.radar-btn:disabled {
  opacity: 0.45;
}

#radar-slider {
  flex: 1 1 auto;
  min-height: 44px;
  accent-color: #3b82f6;
}

.location-prompt {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.location-prompt[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.location-prompt-card {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  text-align: center;
  color: #1f2937;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.location-prompt-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.location-prompt-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.location-prompt-card p {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.45;
}

.location-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.prompt-btn {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  touch-action: manipulation;
}

.prompt-btn:active {
  transform: scale(0.98);
}

.prompt-btn-primary {
  background: #007aff;
  color: #ffffff;
}

.prompt-btn-primary:hover {
  opacity: 0.9;
}

.prompt-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.prompt-btn-secondary:hover {
  background: #e5e7eb;
}

footer {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  padding-bottom: env(safe-area-inset-bottom);
}

.skeleton {
  animation: shimmer 1.6s infinite;
}

.skeleton-line {
  width: 70%;
  height: 0.65rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.25rem auto;
}

.skeleton-line.short {
  width: 45%;
}

@keyframes shimmer {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* iOS landscape / larger phones */
@media (min-width: 430px) and (min-height: 700px) {
  .hero-temp { font-size: 7rem; }
  #map { height: 320px; }
}

/* iPad */
@media (min-width: 768px) {
  .app {
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }
  .sheet {
    max-width: 420px;
    width: 100%;
    border-radius: 1.5rem;
    max-height: 900px;
  }
  .scroll-content {
    padding-bottom: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; }
}
