:root {
  --bg: #f7f1e3;
  --panel: rgba(251, 248, 241, 0.82);
  --panel-strong: rgba(255, 251, 245, 0.96);
  --panel-border: rgba(14, 77, 88, 0.14);
  --ink: #15343a;
  --muted: #4f676c;
  --teal: #0f7b82;
  --teal-deep: #0a5963;
  --sun: #f28d35;
  --sky: #7ec8d6;
  --danger-soft: #f6e1d0;
  --shadow: 0 24px 60px rgba(18, 41, 53, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 141, 53, 0.16), transparent 30%),
    radial-gradient(circle at right 20%, rgba(126, 200, 214, 0.26), transparent 32%),
    linear-gradient(135deg, #f8f0de 0%, #f4ead7 48%, #edf4f3 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 52, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 52, 58, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 92%);
}

.page-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
}

.page-glow-left {
  top: -12rem;
  left: -8rem;
  background: rgba(242, 141, 53, 0.22);
}

.page-glow-right {
  right: -12rem;
  bottom: -16rem;
  background: rgba(15, 123, 130, 0.22);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: grid;
  grid-template-columns: 1.08fr 1.4fr;
  gap: 1.2rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.44);
  pointer-events: none;
}

.control-panel,
.report-panel,
.forecast-panel {
  padding: 1.6rem;
}

.control-panel {
  min-height: 420px;
}

.forecast-panel {
  grid-column: 1 / -1;
}

.eyebrow,
.mini-label,
.status-pill,
.forecast-note,
.field-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.mini-label,
.field-label,
.forecast-note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.section-note {
  font-size: 0.82rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.4rem, 3.8vw, 4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0.3rem;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.intro,
.voice-copy,
.summary,
.forecast-note {
  color: var(--muted);
  line-height: 1.6;
}

.city-form {
  margin-top: 2rem;
}

.field-row,
.action-row,
.section-title-row {
  display: flex;
  gap: 0.75rem;
}

.field-row {
  margin-top: 0.6rem;
}

.action-row {
  margin-top: 0.9rem;
}

.section-title-row {
  align-items: center;
  justify-content: space-between;
}

input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(10, 89, 99, 0.16);
  border-radius: 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
}

input:focus {
  outline: 2px solid rgba(15, 123, 130, 0.18);
  border-color: var(--teal);
}

button {
  border: 0;
  border-radius: 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-btn,
.secondary-btn,
.quick-pick,
.saved-chip,
.remove-chip {
  padding: 0.95rem 1.2rem;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  box-shadow: 0 18px 34px rgba(15, 123, 130, 0.24);
}

.secondary-btn,
.saved-chip,
.remove-chip,
.quick-pick {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(10, 89, 99, 0.08);
}

.utility-btn {
  flex: 1;
}

.utility-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--sun), #d7651e);
  box-shadow: 0 14px 30px rgba(215, 101, 30, 0.24);
}

.chip-section {
  margin-top: 1.2rem;
}

.chip-list,
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.saved-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.remove-chip {
  padding: 0.55rem 0.8rem;
  color: var(--teal-deep);
  background: rgba(15, 123, 130, 0.08);
}

.empty-chip {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  font-size: 0.92rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(10, 89, 99, 0.12);
}

.voice-box {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(126, 200, 214, 0.18));
}

.report-panel {
  background:
    radial-gradient(circle at top right, rgba(126, 200, 214, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.48)),
    var(--panel);
}

.report-topline,
.forecast-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.status-pill {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--teal-deep);
  background: rgba(15, 123, 130, 0.1);
}

.hero-weather {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1.4rem;
}

.condition {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: var(--teal-deep);
}

.temperature-line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

#temperature {
  font-size: clamp(4rem, 9vw, 7.2rem);
  font-weight: 700;
  line-height: 0.9;
}

.temperature-unit {
  font-size: 1.8rem;
  color: var(--muted);
}

.signal-card {
  position: relative;
  min-height: 250px;
  border-radius: 26px;
  padding: 1.3rem;
  color: #f7fffe;
  background: linear-gradient(160deg, #0f7b82 0%, #0d5660 55%, #0d4a53 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.signal-ring {
  position: absolute;
  inset: 14% auto auto 50%;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
}

.signal-ring::before,
.signal-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.signal-ring::after {
  inset: 30px;
}

.signal-title,
.signal-city,
.signal-subtitle {
  position: relative;
  z-index: 1;
}

.signal-title {
  margin-top: 8.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.82;
}

.signal-city {
  margin-bottom: 0.25rem;
  font-size: 1.9rem;
  font-weight: 700;
}

.signal-subtitle {
  margin-bottom: 0;
  opacity: 0.78;
}

.stats-grid,
.forecast-grid {
  display: grid;
  gap: 0.9rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.stat-card,
.forecast-card {
  border-radius: 22px;
  padding: 1rem;
  background: var(--panel-strong);
  border: 1px solid rgba(10, 89, 99, 0.08);
}

.stat-label,
.forecast-day,
.forecast-code,
.forecast-meta {
  color: var(--muted);
}

.stat-label,
.forecast-meta {
  font-size: 0.9rem;
}

.stat-value {
  margin-bottom: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.forecast-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.forecast-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.forecast-day {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-code {
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 700;
}

.forecast-temp-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}

.forecast-high {
  font-size: 2rem;
  font-weight: 700;
}

.forecast-low {
  font-size: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: slide-up 700ms ease forwards;
}

.reveal-delay-1 {
  animation-delay: 80ms;
}

.reveal-delay-2 {
  animation-delay: 180ms;
}

.reveal-delay-3 {
  animation-delay: 280ms;
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-weather {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top, rgba(242, 141, 53, 0.18), transparent 28%),
      linear-gradient(180deg, #f4ead8 0%, #eff4f2 100%);
  }

  .app-shell {
    width: min(100% - 1rem, 100%);
    padding: 0.85rem 0 1.4rem;
    gap: 0.9rem;
  }

  .control-panel,
  .report-panel,
  .forecast-panel {
    padding: 1.05rem;
    border-radius: 24px;
  }

  .report-panel {
    order: -1;
  }

  .field-row,
  .action-row,
  .voice-box,
  .report-topline,
  .forecast-header,
  .section-title-row {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .quick-pick,
  .saved-chip,
  .remove-chip,
  .utility-btn {
    width: 100%;
  }

  .stats-grid,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .signal-card {
    min-height: 212px;
  }

  .voice-box {
    position: sticky;
    bottom: 0.5rem;
    z-index: 4;
    background: linear-gradient(135deg, rgba(255, 251, 245, 0.94), rgba(126, 200, 214, 0.34));
    box-shadow: 0 20px 40px rgba(18, 41, 53, 0.16);
  }

  .chip-list {
    gap: 0.55rem;
  }
}
