:root {
  --weather-card-bg: #ffffff;
  --weather-card-border: #d9e3ef;
  --weather-card-shadow: rgba(26, 41, 58, 0.08);
}

.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 251, 255, 0.92);
  z-index: 1045;
  transition: opacity 0.2s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader-card {
  min-width: 280px;
  max-width: 92vw;
  text-align: center;
  background: #fff;
  border: 1px solid var(--weather-card-border);
  border-radius: 0.85rem;
  padding: 1rem;
  box-shadow: 0 0.8rem 1.8rem var(--weather-card-shadow);
}

.page-loader .progress {
  height: 0.45rem;
}

.clock-value {
  color: #435568;
  font-size: 1rem;
  font-weight: 600;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.weather-panel {
  background: var(--weather-card-bg);
  border: 1px solid var(--weather-card-border);
  border-radius: 0.85rem;
  padding: 0.75rem;
  min-height: 220px;
  box-shadow: 0 0.65rem 1.45rem var(--weather-card-shadow);
  overflow: hidden;
}

.weather-frame {
  width: 100%;
  min-height: 320px;
  border: 0;
}

.weather-panel-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}

.weather-stack-item {
  display: flex;
}

.weather-stack-item + .weather-stack-item {
  border-top: 1px solid var(--weather-card-border);
  padding-top: 0.6rem;
}

.weather-frame-stacked {
  min-height: 255px;
  height: 255px;
}

.ia-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #4a5f76;
}

.ia-loading.is-hidden {
  display: none;
}

.ia-textarea {
  min-height: 160px;
  resize: vertical;
}

#share-x {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#share-x img {
  filter: invert(1);
}

@media (max-width: 767px) {
  .clock-value {
    font-size: 0.95rem;
  }

  .weather-panel {
    min-height: 200px;
  }

  .weather-frame {
    min-height: 300px;
  }

  .weather-frame-stacked {
    min-height: 240px;
    height: 240px;
  }
}
