:root {
  --bg-1: #0a382b;
  --bg-2: #9f1f2f;
  --surface: rgba(48, 22, 16, 0.78);
  --surface-strong: rgba(64, 23, 14, 0.9);
  --text: #fff3df;
  --muted: #ffddb2;
  --accent: #ffe14a;
  --danger: #f94144;
  --ice: #c4f1ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #ff9f1c, var(--bg-1) 42%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.aurora {
  position: fixed;
  inset: -30%;
  pointer-events: none;
  background: conic-gradient(from 160deg at 30% 50%, rgba(248, 213, 71, 0.2), rgba(231, 94, 55, 0.15), rgba(6, 120, 92, 0.11), rgba(248, 213, 71, 0.2));
  filter: blur(50px);
  animation: drift 20s ease-in-out infinite alternate;
}

.layout {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.confetti {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 1;
}

.confetti-a {
  background-image: radial-gradient(circle, rgba(255, 225, 74, 0.32) 0 6px, transparent 7px),
    radial-gradient(circle, rgba(255, 99, 71, 0.22) 0 4px, transparent 5px);
  background-size: 150px 150px, 90px 90px;
  animation: floaty 22s linear infinite;
}

.confetti-b {
  background-image: radial-gradient(circle, rgba(29, 160, 120, 0.24) 0 5px, transparent 6px);
  background-size: 130px 130px;
  animation: floaty-reverse 24s linear infinite;
}

.hero {
  position: relative;
  background: var(--surface-strong);
  border: 2px solid rgba(255, 225, 74, 0.55);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(7px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.hero-ribbon {
  position: absolute;
  top: 14px;
  z-index: 2;
  background: linear-gradient(130deg, #ffe14a, #ff7a32);
  color: #3b1a0a;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.25);
}

.hero-ribbon.left {
  left: -12px;
  transform: rotate(-8deg);
}

.hero-ribbon.right {
  right: -10px;
  transform: rotate(7deg);
}

.hero-top {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.2rem;
  align-items: center;
}

.portrait-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 22px;
  border: 3px solid rgba(255, 225, 74, 0.9);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0.5rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: linear-gradient(155deg, rgba(248, 213, 71, 0.35), rgba(166, 47, 47, 0.45));
}

.portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 800;
}

h1 {
  margin: 0.4rem 0 0;
  font-family: "Staatliches", sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

.subtitle {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.subtitle span {
  color: var(--accent);
  font-weight: 800;
}

.hero-promo {
  margin: 0.8rem 0 0;
  display: inline-block;
  background: linear-gradient(130deg, #ffe14a, #ff8730);
  color: #34140c;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transform: rotate(-1.5deg);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.sponsor-strip {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sponsor-strip span {
  display: inline-block;
  background: rgba(255, 243, 223, 0.12);
  border: 1px solid rgba(255, 225, 74, 0.55);
  border-radius: 7px;
  padding: 0.2rem 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.breaking-wrap {
  margin: 1rem 0;
  display: grid;
  gap: 0.45rem;
}

.breaking-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff8e6;
}

.breaking-track {
  border-radius: 10px;
  border: 1px solid rgba(255, 225, 74, 0.65);
  background: rgba(46, 17, 12, 0.86);
  overflow: hidden;
}

.breaking-ticker {
  display: inline-block;
  white-space: nowrap;
  padding: 0.55rem 0;
  color: #ffe8c9;
  font-weight: 700;
  animation: ticker 18s linear infinite;
}

.promo-badge {
  margin: 0;
  background: rgba(255, 225, 74, 0.18);
  border: 1px dashed rgba(255, 225, 74, 0.9);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.meta-label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-meta p {
  margin: 0.2rem 0;
}

.alert-banner {
  margin: 1rem 0;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: rgba(249, 65, 68, 0.9);
  color: #fff7f7;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 24px rgba(249, 65, 68, 0.45);
}

.alert-focus {
  margin-bottom: 1rem;
}

.comic-callout {
  margin: 0.2rem 0 0.9rem;
  background: linear-gradient(155deg, #ffe14a, #ff8f37);
  border: 2px solid #fff7d1;
  border-radius: 14px;
  color: #40190f;
  padding: 0.6rem 0.75rem;
  transform: rotate(-1.2deg);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.25);
}

.comic-burst {
  margin: 0;
  font-family: "Staatliches", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.comic-line {
  margin: 0.1rem 0 0;
  font-weight: 800;
}

.snow-meter {
  margin-top: 1rem;
  background: rgba(196, 241, 255, 0.12);
  border: 1px solid rgba(196, 241, 255, 0.35);
  border-radius: 14px;
  padding: 0.9rem;
}

.meter-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--ice);
}

.meter-track {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.meter-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #8fd3ff, #e0f4ff);
  transition: width 600ms ease;
}

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

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 216, 178, 0.45);
  border-radius: 18px;
  padding: 1rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.big {
  margin: 0.2rem 0;
  font-size: 2.4rem;
  font-weight: 800;
}

.current-details {
  color: var(--muted);
}

.current-details p,
.forecast-item p {
  margin: 0.4rem 0;
}

.forecast-list {
  display: grid;
  gap: 0.55rem;
}

.forecast-item {
  background: rgba(255, 243, 223, 0.08);
  border: 1px solid rgba(255, 225, 74, 0.35);
  border-radius: 12px;
  padding: 0.65rem;
}

.forecast-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
}

.radar-panel {
  grid-column: span 2;
}

.disclaimer {
  margin-top: 1rem;
}

#radar {
  width: 100%;
  height: 370px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(8, 4, 3, 0.84);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  max-width: 560px;
  width: 100%;
  background: linear-gradient(170deg, #3d190f, #5f2417);
  border: 2px solid rgba(255, 225, 74, 0.8);
  border-radius: 18px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.modal-card h2 {
  margin: 0 0 0.65rem;
}

.modal-btn {
  width: 100%;
  margin-top: 0.5rem;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(130deg, #ffe14a, #ff9138);
  color: #3b1a0a;
  font-weight: 800;
  cursor: pointer;
}

body.alert-mode {
  background: radial-gradient(circle at 20% 20%, #4b0707, #240404 55%),
    linear-gradient(145deg, #310202, #6a0a0a);
}

body.alert-mode .panel,
body.alert-mode .hero {
  border-color: rgba(255, 210, 210, 0.48);
  box-shadow: 0 0 18px rgba(249, 65, 68, 0.38);
}

body.alert-mode.alert-snow {
  background: radial-gradient(circle at 15% 15%, #2a3b5a, #0f1b2e 55%),
    linear-gradient(145deg, #1c2c4c, #3f5c7f);
}

body.alert-mode.alert-snow .alert-banner {
  background: rgba(140, 198, 255, 0.94);
  color: #041329;
  box-shadow: 0 0 24px rgba(156, 214, 255, 0.65);
}

body.alert-mode.alert-flood {
  background: radial-gradient(circle at 18% 20%, #00334a, #001c2e 56%),
    linear-gradient(145deg, #002f4d, #00557d);
}

body.alert-mode.alert-wind {
  background: radial-gradient(circle at 22% 20%, #4d3300, #281a00 56%),
    linear-gradient(145deg, #5a3800, #885300);
}

@keyframes drift {
  from {
    transform: translate(-4%, -2%) scale(1.02);
  }
  to {
    transform: translate(4%, 3%) scale(1.1);
  }
}

@keyframes floaty {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50px);
  }
}

@keyframes floaty-reverse {
  from {
    transform: translateY(-40px);
  }
  to {
    transform: translateY(20px);
  }
}

@keyframes ticker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 880px) {
  .hero-ribbon {
    position: static;
    display: inline-block;
    margin-bottom: 0.45rem;
    transform: none;
  }

  .hero-top {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .portrait-wrap {
    width: min(72vw, 280px);
    height: min(72vw, 280px);
  }

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

  .radar-panel {
    grid-column: auto;
  }

  #radar {
    height: 310px;
  }
}
