* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #08131a;
  color: #f5f7fa;
  font-family: Arial, Helvetica, sans-serif;
}

body { min-height: 100vh; }
.hidden { display: none !important; }

.island-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, rgba(38, 80, 96, 0.35), transparent 40%),
    linear-gradient(180deg, #08131a 0%, #10242d 100%);
}

.island-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(7, 15, 20, 0.72);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hud-left, .hud-center, .hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-center {
  flex: 1;
  justify-content: center;
}

.hud-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  white-space: nowrap;
}

.blaze-banner {
  max-width: 760px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 191, 0, 0.12);
  border: 1px solid rgba(255, 191, 0, 0.25);
  color: #ffd86b;
  text-align: center;
  font-size: 14px;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: #1c7d57;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.hud-btn.alt { background: rgba(255,255,255,0.08); }
.hud-btn.is-live { background: rgba(255,191,0,0.18); color: #ffe28d; border: 1px solid rgba(255,191,0,0.35); }
.hud-btn:hover { filter: brightness(1.08); }

.island-stage {
  position: relative;
  width: min(95vw, 1200px);
  height: 80vh;
  margin: 20px auto;
  border-radius: 20px;
  overflow: hidden;
  background: #0b1e27;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  isolation: isolate;
}

.layer {
  position: absolute;
  inset: 0;
}

.island-art-layer,
.island-video-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.island-art-layer {
  z-index: 2;
}

.island-video-layer {
  z-index: 2;
  pointer-events: none;
}

#island-map-image,
#island-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  transform-origin: center top;
}

#island-map-image {
  z-index: 1;
}

#island-bg-video {
   position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center 20%;
  opacity: 0.17;
  filter: blur(0px) brightness(2);
transform: scale(1.30) translateY(-24%);
    
}

.island-stage.video-fallback #island-bg-video {
  opacity: 0;
}

#storm-layer { z-index: 3; }
#effects-layer { z-index: 4; }
.hotspot-layer { z-index: 5; pointer-events: none; }
.stage-corner { z-index: 6; }

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.03);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08), 0 0 20px rgba(255,255,255,0.18);
}

.hotspot.is-selected {
  background: rgba(255, 191, 0, 0.18);
  border-color: rgba(255, 191, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 191, 0, 0.25);
}

.stage-corner {
  position: absolute;
  bottom: 16px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 15, 20, 0.58);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.stage-corner-left { left: 16px; }
.stage-corner-right { right: 16px; text-align: right; }
.corner-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9eb9cc;
}
.corner-value {
  font-size: 13px;
  color: #f1f8ff;
}

.island-status-strip {
  width: min(95vw, 1200px);
  margin: 0 auto 18px auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.status-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.status-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ffcf72;
}

.status-card span {
  display: block;
  color: #eef7ff;
  font-size: 14px;
  line-height: 1.35;
}

.zone-panel {
  width: min(92%, 520px);
  margin: 0 auto 24px auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(9, 17, 22, 0.88);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.zone-panel h2 { margin: 0 0 10px 0; font-size: 24px; }
.zone-panel p { margin: 0 0 12px 0; line-height: 1.5; color: #c9d5de; }
.zone-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px 0;
}
.zone-meta .meta-pill {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: #dbe6ee;
  font-size: 13px;
}
.zone-meta .meta-pill strong {
  display: block;
  color: #ffd86b;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.zone-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px 0;
}

.zone-panel .sub-btn {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #eef7ff;
  cursor: pointer;
  font-weight: 700;
}

.zone-panel .sub-btn:hover {
  background: rgba(255,255,255,0.11);
}

.zone-panel .panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.zone-panel button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.zone-panel .enter-btn { background: #d7a919; color: #1d1602; }
.zone-panel .close-btn { background: rgba(255,255,255,0.08); color: #fff; }

.tooltip {
  position: fixed;
  z-index: 100;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 12, 16, 0.94);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
  font-size: 13px;
  line-height: 1.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: min(92vw, 620px);
  background: #0d1820;
  color: #fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 22px;
}

.modal h2 { margin-top: 0; }
.modal p, .modal li { color: #d2dce3; line-height: 1.5; }
.modal button {
  margin-top: 16px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #1c7d57;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 960px) {
  .island-hud {
    flex-direction: column;
    align-items: stretch;
  }

  .hud-left, .hud-center, .hud-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .island-stage {
    width: min(96vw, 1200px);
    height: 74vh;
  }

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

  .stage-corner {
    min-width: 132px;
    padding: 8px 10px;
  }
}


.island-stage.is-breathing { transition: filter .65s ease, transform 1.2s ease; transform-origin: center center; }


.island-consequence-strip {
  width: min(95vw, 1200px);
  margin: 0 auto 22px auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(8,14,18,0.74);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
.consequence-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom: 12px;
}
.consequence-head strong {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffd86b;
}
.consequence-state-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #eff8ff;
}
.consequence-rail {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.consequence-card {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015), 0 10px 22px rgba(0,0,0,0.18);
}
.consequence-card::after {
  content:"";
  position:absolute;
  inset:auto -14% -40% auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,216,107,0.18), transparent 68%);
  pointer-events:none;
}
.consequence-card .eyebrow {
  display:block;
  margin-bottom:8px;
  font-size: 11px;
  letter-spacing:.08em;
  text-transform: uppercase;
  color: #9db7ca;
}
.consequence-card .title {
  display:block;
  font-size: 18px;
  font-weight: 800;
  color: #f3f9ff;
}
.consequence-card .copy {
  margin-top:8px;
  font-size: 13px;
  line-height: 1.45;
  color: #d3dde6;
}
.consequence-card .meta {
  display:inline-flex;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #eff7ff;
}
.consequence-card.is-storm .title { color: #ffd86b; }
.consequence-card.is-vault .title { color: #ffe9a8; }
.consequence-card.is-surge .title { color: #8fe0ff; }
.consequence-card.is-climate .title { color: #a6ffb5; }
.consequence-card.is-watch .title { color: #f0f7ff; }
@media (max-width: 900px) {
  .consequence-rail { grid-template-columns: 1fr; }
}


@media (prefers-reduced-motion: reduce) {
  #island-bg-video {
    opacity: 0.24;
    filter: brightness(0.8);
  }
}


/* Patch H: storm cloud + weather layer */
#weather-layer { z-index: 3; pointer-events: none; overflow: hidden; }
#storm-layer { z-index: 4; }
#effects-layer { z-index: 5; }
.hotspot-layer { z-index: 6; }
.stage-corner { z-index: 7; }

.cloud-bank, .storm-haze, .rain-sheet, .season-wash, .radio-beam, .vault-halo, .storm-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
}

.cloud-bank {
  inset: -10% -12%;
  background-repeat: repeat-x;
  background-size: 38% 100%;
  mix-blend-mode: screen;
  filter: blur(14px);
}

.cloud-back {
  background-image: radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.16), rgba(255,255,255,0) 58%), radial-gradient(ellipse at 70% 45%, rgba(190,220,255,.18), rgba(190,220,255,0) 60%);
  animation: ghCloudDriftBack 48s linear infinite;
}

.cloud-mid {
  background-image: radial-gradient(ellipse at 30% 55%, rgba(255,255,255,.18), rgba(255,255,255,0) 55%), radial-gradient(ellipse at 78% 45%, rgba(255,235,190,.16), rgba(255,235,190,0) 60%);
  animation: ghCloudDriftMid 34s linear infinite;
}

.cloud-front {
  background-image: radial-gradient(ellipse at 18% 48%, rgba(255,255,255,.22), rgba(255,255,255,0) 50%), radial-gradient(ellipse at 82% 52%, rgba(170,210,255,.18), rgba(170,210,255,0) 56%);
  animation: ghCloudDriftFront 22s linear infinite;
  filter: blur(10px);
}

.storm-haze {
  background: radial-gradient(circle at 50% 18%, rgba(191,225,255,.14), rgba(90,130,180,0) 44%), linear-gradient(180deg, rgba(33,53,74,.28), rgba(6,12,18,0));
}

.rain-sheet {
  background-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.10) 50%, rgba(255,255,255,0) 100%);
  background-size: 3px 16px;
  transform: skewX(-14deg) translateY(-8%);
  animation: ghRainFall .65s linear infinite;
}

.season-wash { background: transparent; }

.radio-beam {
  inset: 0 auto 0 38%;
  width: 28%;
  background: linear-gradient(180deg, rgba(81,255,186,0), rgba(81,255,186,.18) 18%, rgba(81,255,186,.04) 44%, rgba(81,255,186,0) 72%);
  clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0%;
}

.vault-halo {
  background: radial-gradient(circle at 71% 18%, rgba(255,196,73,.28), rgba(255,180,0,.08) 14%, rgba(255,180,0,0) 29%);
  filter: blur(6px);
}

.storm-glow {
  background: radial-gradient(circle at 50% 22%, rgba(191,225,255,.25), rgba(191,225,255,0) 34%);
  mix-blend-mode: screen;
}

.island-app.storm-rising #weather-layer .cloud-back,
.island-app.storm-rising #weather-layer .cloud-mid,
.island-app.storm-rising #weather-layer .storm-haze { opacity: .35; }
.island-app.storm-rising #weather-layer .cloud-front { opacity: .22; }
.island-app.storm-rising #weather-layer .radio-beam { opacity: .24; animation: ghRadioSweep 5.4s ease-in-out infinite; }
.island-app.storm-rising #weather-layer .vault-halo { opacity: .34; animation: ghVaultPulse 4.8s ease-in-out infinite; }

.island-app.storm-critical #weather-layer .cloud-back,
.island-app.storm-critical #weather-layer .cloud-mid,
.island-app.storm-critical #weather-layer .cloud-front,
.island-app.storm-critical #weather-layer .storm-haze { opacity: .6; }
.island-app.storm-critical #weather-layer .rain-sheet { opacity: .2; }
.island-app.storm-critical #weather-layer .radio-beam { opacity: .38; animation: ghRadioSweep 3.4s ease-in-out infinite; }
.island-app.storm-critical #weather-layer .vault-halo { opacity: .55; animation: ghVaultPulse 2.8s ease-in-out infinite; }
.island-app.storm-critical #weather-layer .storm-glow { opacity: .3; animation: ghStormGlow 1.9s ease-in-out infinite; }

.island-app.storm-break #weather-layer .cloud-back,
.island-app.storm-break #weather-layer .cloud-mid,
.island-app.storm-break #weather-layer .cloud-front,
.island-app.storm-break #weather-layer .storm-haze { opacity: .78; }
.island-app.storm-break #weather-layer .rain-sheet { opacity: .28; }
.island-app.storm-break #weather-layer .radio-beam { opacity: .55; animation: ghRadioSweep 2.2s linear infinite; }
.island-app.storm-break #weather-layer .vault-halo { opacity: .75; animation: ghVaultPulse 1.7s ease-in-out infinite; }
.island-app.storm-break #weather-layer .storm-glow { opacity: .42; animation: ghStormGlow 1.15s ease-in-out infinite; }

.island-app.season-winter #weather-layer .season-wash {
  opacity: .22;
  background: linear-gradient(180deg, rgba(188,228,255,.20), rgba(115,162,205,.06));
}
.island-app.season-spring #weather-layer .season-wash {
  opacity: .15;
  background: linear-gradient(180deg, rgba(118,255,188,.12), rgba(92,198,158,.04));
}
.island-app.season-summer #weather-layer .season-wash {
  opacity: .13;
  background: linear-gradient(180deg, rgba(255,205,92,.15), rgba(255,166,79,.04));
}
.island-app.season-autumn #weather-layer .season-wash {
  opacity: .18;
  background: linear-gradient(180deg, rgba(255,173,92,.16), rgba(187,102,38,.05));
}

#island-bg-video { transition: opacity .8s ease, filter .8s ease, transform .8s ease; }
.island-app.storm-rising #island-bg-video { opacity: .21; filter: blur(0px) brightness(2.2) saturate(1.06); }
.island-app.storm-critical #island-bg-video { opacity: .24; filter: blur(0px) brightness(2.35) saturate(1.1); }
.island-app.storm-break #island-bg-video { opacity: .27; filter: blur(0px) brightness(2.5) saturate(1.12); }

@keyframes ghCloudDriftBack { from { transform: translateX(-8%) scale(1.02); } to { transform: translateX(8%) scale(1.05); } }
@keyframes ghCloudDriftMid { from { transform: translateX(6%) scale(1.02); } to { transform: translateX(-10%) scale(1.05); } }
@keyframes ghCloudDriftFront { from { transform: translateX(-12%) scale(1.01); } to { transform: translateX(10%) scale(1.06); } }
@keyframes ghRainFall { from { background-position: 0 -18px; } to { background-position: -12px 22px; } }
@keyframes ghRadioSweep { 0%,100% { transform: translateX(0) scaleX(1); filter: blur(0px); } 50% { transform: translateX(2%) scaleX(1.08); filter: blur(1px); } }
@keyframes ghVaultPulse { 0%,100% { transform: scale(1); filter: blur(6px); } 50% { transform: scale(1.08); filter: blur(10px); } }
@keyframes ghStormGlow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }


.island-climate-rail {
  width: min(95vw, 1200px);
  margin: 0 auto 20px auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.climate-chip {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.climate-chip strong {
  display:block;
  margin-bottom:6px;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#9fd9ff;
}

.climate-chip span {
  color:#eef7ff;
  font-size:14px;
  line-height:1.35;
}

.climate-chip.special-420 {
  border-color: rgba(255,191,0,0.18);
  background: linear-gradient(180deg, rgba(255,191,0,0.08), rgba(255,255,255,0.04));
}

.climate-chip.special-420.is-live {
  box-shadow: 0 0 28px rgba(255,191,0,0.18), 0 10px 24px rgba(0,0,0,0.16);
}

.daypart-dawn .island-stage { filter: saturate(1.03) brightness(1.02); }
.daypart-day .island-stage { filter: saturate(1.06) brightness(1.03); }
.daypart-dusk .island-stage { filter: saturate(1.04) brightness(0.98); }
.daypart-night .island-stage { filter: saturate(1.0) brightness(0.94); }

.signal-420-live .island-stage { box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 40px rgba(255,191,0,0.22); }

@media (max-width: 900px) {
  .island-status-strip, .island-climate-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
