:root {
  color-scheme: dark;
  --ink: #f6fdff;
  --muted: #c5e6ea;
  --panel: rgba(4, 48, 58, 0.58);
  --line: rgba(226, 252, 255, 0.28);
  --cyan: #82edf2;
  --mint: #7ff0cc;
  --amber: #ffd28a;
  --coral: #ff7a69;
  --sea: #13a7b4;
  --sand: #f0dca8;
  --foam: #f4feff;
  --deep: #032329;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #032329;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(3, 35, 41, 0.26), rgba(4, 45, 55, 0.52) 42%, rgba(3, 23, 28, 0.88) 100%),
    linear-gradient(115deg, rgba(244, 254, 255, 0.12), transparent 28%, rgba(19, 167, 180, 0.16) 62%, transparent 100%),
    url("./assets/ocean-wave-blur.jpg") center top / cover fixed no-repeat,
    #032329;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.04), transparent 28%),
    repeating-linear-gradient(168deg, rgba(244, 254, 255, 0.052) 0 1px, transparent 1px 92px);
  opacity: 0.66;
}

body::after {
  content: "";
  position: fixed;
  left: -12vw;
  right: -12vw;
  bottom: -20vh;
  height: 42vh;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(168deg, transparent 0 34%, rgba(244, 254, 255, 0.22) 34% 36%, transparent 36% 100%),
    linear-gradient(172deg, transparent 0 48%, rgba(130, 237, 242, 0.16) 48% 50%, transparent 50% 100%),
    repeating-linear-gradient(170deg, rgba(244, 254, 255, 0.18) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, rgba(19, 167, 180, 0), rgba(19, 167, 180, 0.28));
  filter: blur(10px);
  opacity: 0.56;
  transform: translate3d(0, 0, 0) rotate(-2deg);
  animation: oceanDrift 18s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 44, 52, 0.56);
  backdrop-filter: blur(22px) saturate(1.22);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(238, 251, 255, 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle at 64% 28%, rgba(241, 214, 160, 0.9) 0 3px, transparent 4px),
    linear-gradient(180deg, rgba(118, 215, 232, 0.28), rgba(22, 141, 160, 0.34));
  box-shadow: inset 0 -8px 0 rgba(112, 223, 189, 0.42), 0 0 18px rgba(118, 215, 232, 0.28);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
}

.status-pill {
  justify-self: end;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8edf2;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  position: relative;
  min-height: 360px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #082430;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 16, 21, 0.88), rgba(4, 16, 21, 0.42), rgba(4, 16, 21, 0.1));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 58px 42px;
}

.eyebrow,
.section-title p,
.card-heading span {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.hero-copy {
  max-width: 560px;
  color: #cce8f3;
  font-size: 18px;
  line-height: 1.65;
}

.timeline-panel,
.spot-map-panel,
.summary-card,
.spot-card,
.detail-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.1), rgba(4, 48, 58, 0.52)),
    var(--panel);
  box-shadow: 0 20px 54px rgba(0, 36, 42, 0.24);
  backdrop-filter: blur(18px) saturate(1.18);
}

.timeline-panel {
  margin-top: 18px;
  padding: 18px;
}

.spot-map-panel {
  margin-top: 16px;
  padding: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.region-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: -4px 0 16px;
}

.region-tab {
  --tier-color: var(--cyan);
  min-height: 72px;
  border: 1px solid rgba(178, 230, 238, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.08), rgba(4, 54, 64, 0.46)),
    rgba(244, 254, 255, 0.035);
  text-align: left;
  cursor: pointer;
}

.region-tab.score-high {
  --tier-color: var(--mint);
}

.region-tab.score-mid {
  --tier-color: var(--amber);
}

.region-tab.score-low {
  --tier-color: var(--coral);
}

.region-tab.active {
  border-color: var(--tier-color);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.18), rgba(4, 60, 70, 0.54)),
    rgba(127, 240, 204, 0.08);
  box-shadow: inset 0 0 0 1px var(--tier-color), 0 14px 32px rgba(0, 44, 50, 0.2);
}

.region-tab span,
.region-tab strong,
.region-tab small {
  display: block;
}

.region-tab span {
  font-weight: 900;
}

.region-tab strong {
  margin-top: 6px;
  color: var(--tier-color);
  font-size: 13px;
}

.region-tab small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.timeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(126px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
}

.day-button {
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.09), rgba(4, 52, 62, 0.44)),
    rgba(244, 254, 255, 0.04);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.day-button.active {
  border-color: rgba(244, 254, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.18), rgba(127, 240, 204, 0.1)),
    rgba(6, 68, 78, 0.54);
  box-shadow: inset 0 0 0 1px rgba(130, 237, 242, 0.28), 0 14px 30px rgba(0, 36, 42, 0.18);
}

.day-button.past {
  opacity: 0.72;
}

.day-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.day-date,
.day-wave {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.day-score {
  display: inline-block;
  margin-top: 10px;
  font-weight: 900;
}

.day-score.score-high,
.map-metrics .score-high strong,
.metric.score-high strong {
  color: var(--mint);
}

.day-score.score-mid,
.map-metrics .score-mid strong,
.metric.score-mid strong {
  color: var(--amber);
}

.day-score.score-low,
.map-metrics .score-low strong,
.metric.score-low strong {
  color: var(--coral);
}

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
}

.map-stage {
  --map-backdrop-zoom: 1.1;
  --map-tint: rgba(19, 160, 170, 0.24);
  --map-accent: rgba(236, 253, 255, 0.2);
  --wave-flow-angle: 0deg;
  --wind-flow-angle: 0deg;
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(178, 230, 238, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 86, 98, 0.18), rgba(5, 43, 52, 0.34)),
    #084555;
  isolation: isolate;
}

.map-backdrop,
.map-tone,
.map-scan,
.coastline {
  position: absolute;
  inset: 0;
}

.map-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0.7;
  filter: blur(7px) saturate(1.14) contrast(0.98);
  transform: scale(var(--map-backdrop-zoom));
  transform-origin: 50% 50%;
  transition: transform 420ms ease, object-position 420ms ease, filter 420ms ease, opacity 420ms ease;
}

.map-tone {
  background:
    radial-gradient(130% 80% at 20% 10%, var(--map-accent), transparent 66%),
    linear-gradient(170deg, var(--map-tint), rgba(3, 35, 43, 0.22) 50%, rgba(2, 26, 34, 0.56));
  mix-blend-mode: screen;
  opacity: 0.8;
  transition: background 420ms ease, opacity 420ms ease;
}

.map-pins-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-flow-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.flow-track {
  position: absolute;
  inset: -10%;
  opacity: 0.48;
  mix-blend-mode: screen;
  will-change: transform;
  overflow: hidden;
}

.flow-track-wave {
  transform: rotate(var(--wave-flow-angle));
  background: radial-gradient(circle at 50% 50%, rgba(182, 242, 255, 0.12), transparent 62%);
}

.flow-track-wind {
  transform: rotate(var(--wind-flow-angle));
  background: radial-gradient(circle at 50% 50%, rgba(140, 235, 248, 0.1), transparent 62%);
}

.flow-particle {
  position: absolute;
  display: block;
  left: -18%;
  top: 50%;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  animation: flowParticleTraverse 10s linear infinite;
}

.flow-track-wave .flow-particle {
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  color: rgba(224, 251, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  transform: rotate(90deg);
  transform-origin: center;
  text-shadow: 0 0 9px rgba(193, 246, 255, 0.34);
}

.flow-track-wind .flow-particle {
  height: 1.7px;
  background: linear-gradient(90deg, rgba(145, 231, 247, 0), rgba(145, 231, 247, 0.32) 42%, rgba(210, 247, 255, 0.94));
  box-shadow: 0 0 9px rgba(153, 236, 249, 0.3);
}

.flow-track-wave.speed-slow .flow-particle {
  animation-duration: 12.5s;
}

.flow-track-wave.speed-mid .flow-particle {
  animation-duration: 9.5s;
}

.flow-track-wave.speed-fast .flow-particle {
  animation-duration: 7s;
}

.flow-track-wind.speed-slow .flow-particle {
  animation-duration: 13s;
}

.flow-track-wind.speed-mid .flow-particle {
  animation-duration: 10s;
}

.flow-track-wind.speed-fast .flow-particle {
  animation-duration: 7.2s;
}

.flow-track-wave.gap-tight .flow-particle.p1 { animation-delay: -0.4s; }
.flow-track-wave.gap-tight .flow-particle.p2 { animation-delay: -0.8s; }
.flow-track-wave.gap-tight .flow-particle.p3 { animation-delay: -1.2s; }
.flow-track-wave.gap-tight .flow-particle.p4 { animation-delay: -1.6s; }
.flow-track-wave.gap-tight .flow-particle.p5 { animation-delay: -2.0s; }
.flow-track-wave.gap-tight .flow-particle.p6 { animation-delay: -2.4s; }
.flow-track-wave.gap-tight .flow-particle.p7 { animation-delay: -2.8s; }
.flow-track-wave.gap-tight .flow-particle.p8 { animation-delay: -3.2s; }
.flow-track-wave.gap-tight .flow-particle.p9 { animation-delay: -3.6s; }
.flow-track-wave.gap-tight .flow-particle.p10 { animation-delay: -4.0s; }

.flow-track-wave.gap-mid .flow-particle.p1 { animation-delay: -0.7s; }
.flow-track-wave.gap-mid .flow-particle.p2 { animation-delay: -1.4s; }
.flow-track-wave.gap-mid .flow-particle.p3 { animation-delay: -2.1s; }
.flow-track-wave.gap-mid .flow-particle.p4 { animation-delay: -2.8s; }
.flow-track-wave.gap-mid .flow-particle.p5 { animation-delay: -3.5s; }
.flow-track-wave.gap-mid .flow-particle.p6 { animation-delay: -4.2s; }
.flow-track-wave.gap-mid .flow-particle.p7 { animation-delay: -4.9s; }
.flow-track-wave.gap-mid .flow-particle.p8 { animation-delay: -5.6s; }
.flow-track-wave.gap-mid .flow-particle.p9 { animation-delay: -6.3s; }
.flow-track-wave.gap-mid .flow-particle.p10 { animation-delay: -7.0s; }

.flow-track-wave.gap-wide .flow-particle.p1 { animation-delay: -1.1s; }
.flow-track-wave.gap-wide .flow-particle.p2 { animation-delay: -2.2s; }
.flow-track-wave.gap-wide .flow-particle.p3 { animation-delay: -3.3s; }
.flow-track-wave.gap-wide .flow-particle.p4 { animation-delay: -4.4s; }
.flow-track-wave.gap-wide .flow-particle.p5 { animation-delay: -5.5s; }
.flow-track-wave.gap-wide .flow-particle.p6 { animation-delay: -6.6s; }
.flow-track-wave.gap-wide .flow-particle.p7 { animation-delay: -7.7s; }
.flow-track-wave.gap-wide .flow-particle.p8 { animation-delay: -8.8s; }
.flow-track-wave.gap-wide .flow-particle.p9 { animation-delay: -9.9s; }
.flow-track-wave.gap-wide .flow-particle.p10 { animation-delay: -11.0s; }

.flow-track-wind .flow-particle.p1 { animation-delay: -1.2s; }
.flow-track-wind .flow-particle.p2 { animation-delay: -3.4s; }
.flow-track-wind .flow-particle.p3 { animation-delay: -0.9s; }
.flow-track-wind .flow-particle.p4 { animation-delay: -5.1s; }
.flow-track-wind .flow-particle.p5 { animation-delay: -2.7s; }
.flow-track-wind .flow-particle.p6 { animation-delay: -4.3s; }
.flow-track-wind .flow-particle.p7 { animation-delay: -6.3s; }
.flow-track-wind .flow-particle.p8 { animation-delay: -7.1s; }
.flow-track-wind .flow-particle.p9 { animation-delay: -4.9s; }
.flow-track-wind .flow-particle.p10 { animation-delay: -8.2s; }

.flow-particle.p3 {
  top: 34%;
  width: 30px;
}

.flow-particle.p1 {
  top: 12%;
  width: 26px;
}

.flow-particle.p2 {
  top: 22%;
  width: 32px;
}

.flow-particle.p4 {
  top: 44%;
  width: 35px;
}

.flow-particle.p5 {
  top: 56%;
  width: 33px;
}

.flow-particle.p6 {
  top: 66%;
  width: 29px;
}

.flow-particle.p7 {
  top: 74%;
  width: 38px;
}

.flow-particle.p8 {
  top: 82%;
  width: 31px;
}

.flow-particle.p9 {
  top: 27%;
  width: 28px;
}

.flow-particle.p10 {
  top: 61%;
  width: 36px;
}

.map-stage.wave-flow-unknown .flow-track-wave,
.map-stage.wind-flow-unknown .flow-track-wind {
  opacity: 0.2;
}

.flow-hud {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.flow-chip {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto auto auto 18px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(223, 250, 255, 0.42);
  background: rgba(3, 39, 47, 0.66);
  backdrop-filter: blur(10px);
}

.flow-chip span {
  font-size: 11px;
  color: #c4edf5;
}

.flow-chip strong {
  font-size: 13px;
  color: #f1feff;
  letter-spacing: 0;
}

.flow-chip small {
  font-size: 11px;
  color: #bce3eb;
}

.flow-chip.wave {
  border-color: rgba(235, 252, 255, 0.48);
}

.flow-chip.wind {
  border-color: rgba(158, 234, 246, 0.48);
}

.flow-arrow {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  transform-origin: 50% 50%;
  transition: transform 280ms ease;
  color: rgba(236, 253, 255, 0.92);
}

.flow-arrow.wave-icon::before {
  content: "≈";
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.flow-arrow.wind-icon::before {
  content: "→";
  font-size: 15px;
  font-weight: 500;
}

.map-scan {
  background:
    linear-gradient(rgba(244, 254, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 237, 242, 0.018) 1px, transparent 1px);
  background-size: 94px 94px;
  mask-image: linear-gradient(180deg, transparent, black 18%, black 82%, transparent);
  opacity: 0.2;
}

.coastline {
  background:
    linear-gradient(108deg, transparent 0 38%, rgba(241, 214, 160, 0.16) 38% 41%, transparent 41%),
    linear-gradient(156deg, transparent 0 48%, rgba(118, 215, 232, 0.12) 48% 51%, transparent 51%);
  opacity: 0.78;
}

.map-pin {
  --pin-color: var(--cyan);
  --pin-glow: rgba(118, 215, 232, 0.72);
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 74px;
  min-height: 36px;
  border: 1px solid rgba(178, 230, 238, 0.36);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(5, 47, 57, 0.66);
  box-shadow: 0 16px 28px rgba(0, 35, 42, 0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
}


.map-pin[hidden] {
  display: none;
}

.map-pin.score-high {
  --pin-color: var(--mint);
  --pin-glow: rgba(68, 240, 178, 0.86);
}

.map-pin.score-mid {
  --pin-color: var(--amber);
  --pin-glow: rgba(244, 199, 107, 0.82);
}

.map-pin.score-low {
  --pin-color: var(--coral);
  --pin-glow: rgba(255, 105, 97, 0.78);
}

.map-pin.active {
  border-color: var(--pin-color);
  background: rgba(244, 254, 255, 0.16);
  box-shadow: inset 0 0 0 1px var(--pin-glow), 0 18px 34px rgba(0, 42, 50, 0.22);
}

.pin-dot {
  position: relative;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pin-color);
  box-shadow: 0 0 18px var(--pin-glow);
}

.map-pin.active .pin-dot {
  background: var(--pin-color);
  box-shadow: 0 0 20px var(--pin-glow);
}

.map-pin.active .pin-dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--pin-color);
  border-radius: 50%;
  animation: pinPulse 1.4s ease-out infinite;
}

.pin-label {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.map-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  border-left: 1px solid var(--line);
  padding: 8px 0 8px 18px;
}

.map-info h2 {
  margin-top: 8px;
  font-size: 34px;
}

.map-name-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-name-row h2 {
  margin: 0;
}


.map-info p:not(.eyebrow) {
  color: #cce8f3;
  line-height: 1.65;
}

.map-type-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spot-fav-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(222, 250, 255, 0.36);
  border-radius: 8px;
  color: #d2eef5;
  background: rgba(7, 74, 86, 0.45);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.spot-fav-btn.active {
  border-color: rgba(127, 240, 204, 0.78);
  background: rgba(64, 177, 145, 0.24);
  color: #7ff0cc;
}

.default-spot-state {
  margin-top: 6px;
  color: #b7dde6;
  font-size: 12px;
}

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

.map-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.052);
}

.map-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.map-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--mint);
  font-size: 20px;
}

.summary-grid,
.spots-grid,
.notes-band {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

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

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

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

.site-footer {
  margin-top: 22px;
  padding: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(214, 239, 244, 0.72);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--foam);
  text-decoration: underline;
}

.summary-card,
.spot-card,
.detail-band {
  padding: 20px;
}

.summary-card.ai-card,
.summary-card.window-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(226, 252, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.12), rgba(6, 70, 82, 0.52) 44%),
    var(--panel);
}

.summary-card.ai-card::before,
.summary-card.window-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(168deg, transparent 0 38%, rgba(244, 254, 255, 0.12) 38% 40%, transparent 40% 100%),
    linear-gradient(180deg, rgba(130, 237, 242, 0.08), transparent 44%);
  pointer-events: none;
  opacity: 0.9;
}

.summary-card.ai-card > *,
.summary-card.window-card > * {
  position: relative;
  z-index: 1;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.card-heading strong {
  font-size: 13px;
  color: var(--muted);
}

.summary-card p {
  color: #d7edf5;
  line-height: 1.65;
}

#aiSummary,
#windowSummary {
  min-height: 112px;
  border: 1px solid rgba(226, 252, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
  color: var(--foam);
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.075), rgba(4, 35, 43, 0.28)),
    rgba(4, 35, 43, 0.36);
  box-shadow: inset 0 0 26px rgba(130, 237, 242, 0.06);
  white-space: pre-line;
}

#aiSummary.typing::after,
#windowSummary.typing::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: var(--mint);
  animation: cursorBlink 0.8s steps(1) infinite;
}

.alert-list {
  display: grid;
  gap: 8px;
}

.alert-item {
  padding: 10px 12px;
  border: 1px solid rgba(244, 199, 107, 0.35);
  border-radius: 8px;
  color: #ffe1a1;
  background: rgba(244, 199, 107, 0.09);
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(4, 45, 54, 0.42);
  line-height: 1.55;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.note-actions button {
  min-height: 38px;
  border: 1px solid rgba(244, 254, 255, 0.62);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--deep);
  background: var(--foam);
  font-weight: 800;
  cursor: pointer;
}

.note-actions button:disabled {
  opacity: 0.66;
  cursor: wait;
}

.note-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.note-item {
  border: 1px solid rgba(226, 252, 255, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(244, 254, 255, 0.055);
}

.note-item.muted {
  color: var(--muted);
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--foam);
  font-size: 12px;
}

.note-meta time {
  color: var(--muted);
}

.note-item p {
  margin: 8px 0 0;
  color: #e4fbff;
  line-height: 1.6;
  white-space: pre-line;
}

#saveState {
  color: var(--muted);
  font-size: 13px;
}

.spot-card {
  position: relative;
  overflow: hidden;
}

.spot-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sea), var(--foam), var(--mint));
}

.spot-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.spot-name {
  margin: 0;
  font-size: 24px;
}

.rating {
  min-width: 76px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #021014;
  font-weight: 900;
}

.rating.Good {
  background: var(--mint);
}

.rating.Fair {
  background: var(--amber);
}

.rating.Poor {
  background: var(--coral);
}

.rating.score-high {
  background: var(--mint);
}

.rating.score-mid {
  background: var(--amber);
}

.rating.score-low {
  background: var(--coral);
}

.score-ring {
  --tier-color: var(--cyan);
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin: 18px 0;
  border-radius: 50%;
  background: conic-gradient(var(--tier-color) calc(var(--score) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.score-ring.score-high {
  --tier-color: var(--mint);
}

.score-ring.score-mid {
  --tier-color: var(--amber);
}

.score-ring.score-low {
  --tier-color: var(--coral);
}

.score-ring.focus {
  box-shadow: 0 0 34px rgba(68, 240, 178, 0.2);
}

.score-ring span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.08), transparent 46%),
    #073942;
  font-weight: 900;
  font-size: 24px;
}

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

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 254, 255, 0.06);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.spot-note {
  margin: 14px 0 0;
  color: #c6dfe9;
  line-height: 1.55;
}

.spot-source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-band {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.spots-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.spot-card[hidden] {
  display: none;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid rgba(178, 230, 238, 0.42);
  border-radius: 999px;
  padding: 7px 14px 7px 7px;
  color: var(--ink);
  background: rgba(4, 50, 60, 0.72);
  box-shadow: 0 18px 44px rgba(0, 40, 48, 0.28), 0 0 26px rgba(244, 254, 255, 0.08);
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(1.12);
}

.chat-launcher img,
.chat-title img {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(68, 240, 178, 0.6);
  border-radius: 50%;
  object-fit: cover;
}

.chat-launcher span {
  font-weight: 900;
}

.chat-panel {
  width: min(380px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(178, 230, 238, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(244, 254, 255, 0.12), rgba(5, 43, 52, 0.92) 38%),
    #073942;
  box-shadow: 0 22px 70px rgba(0, 37, 44, 0.44), 0 0 32px rgba(244, 254, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-title strong,
.chat-title span {
  display: block;
}

.chat-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.chat-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.chat-messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  min-height: 210px;
  overflow-y: auto;
  padding: 12px;
}

.chat-message {
  display: flex;
}

.chat-message.user {
  justify-content: end;
}

.chat-bubble {
  max-width: 86%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: #dff6ff;
  background: rgba(244, 254, 255, 0.06);
  line-height: 1.55;
  white-space: pre-line;
}

.chat-message.user .chat-bubble {
  border-color: rgba(244, 254, 255, 0.72);
  color: #041015;
  background: var(--foam);
  font-weight: 700;
}

.chat-message.pending .chat-bubble {
  color: var(--muted);
}

.chat-quick-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 12px;
}

.chat-quick-actions button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(241, 214, 160, 0.36);
  border-radius: 999px;
  padding: 0 12px;
  color: #f8efe0;
  background: rgba(241, 214, 160, 0.1);
  cursor: pointer;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.chat-quick-actions button:hover {
  border-color: rgba(241, 214, 160, 0.68);
  background: rgba(241, 214, 160, 0.16);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  min-height: 46px;
  max-height: 120px;
  resize: none;
}

.chat-form button {
  min-width: 68px;
  min-height: 46px;
  border: 1px solid rgba(68, 240, 178, 0.55);
  border-radius: 8px;
  color: var(--deep);
  background: var(--mint);
  font-weight: 900;
  cursor: pointer;
}

.chat-form button:disabled,
.chat-form textarea:disabled {
  opacity: 0.62;
  cursor: wait;
}

@keyframes pinPulse {
  from {
    opacity: 0.9;
    transform: scale(0.75);
  }

  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes cursorBlink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

@keyframes oceanDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
    transform: translate3d(-1.5vw, 0, 0) rotate(-2deg);
  }

  to {
    background-position: 80px 0, -120px 0, 160px 0, 0 0;
    transform: translate3d(1.5vw, -1.5vh, 0) rotate(-1deg);
  }
}

@keyframes flowParticleTraverse {
  0% {
    left: -18%;
    opacity: 0;
  }

  10% {
    opacity: 0.88;
  }

  86% {
    opacity: 0.88;
  }

  100% {
    left: 118%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .map-pin.active .pin-dot::after,
  #aiSummary.typing::after,
  #windowSummary.typing::after,
  .flow-particle {
    animation: none;
  }
}

@media (max-width: 860px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .app-shell {
    width: min(100% - 20px, 1240px);
  }

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

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 340px;
  }

  .hero-overlay {
    padding: 38px 22px;
  }

  .timeline {
    grid-auto-columns: 132px;
  }

  .region-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(124px, 34vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .region-tab {
    min-height: 66px;
    scroll-snap-align: start;
  }

  .map-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .map-stage {
    min-height: 330px;
  }

  .flow-hud {
    right: 8px;
    top: 8px;
    gap: 6px;
  }

  .flow-chip {
    min-height: 27px;
    padding: 5px 8px;
    gap: 6px;
  }

  .map-info {
    position: relative;
    z-index: 3;
    min-height: auto;
    margin-top: -18px;
    border: 1px solid rgba(178, 230, 238, 0.26);
    border-radius: 8px;
    padding: 14px;
    background:
      linear-gradient(180deg, rgba(244, 254, 255, 0.1), rgba(5, 48, 58, 0.78)),
      rgba(4, 48, 58, 0.82);
    box-shadow: 0 16px 34px rgba(0, 39, 47, 0.24);
    backdrop-filter: blur(16px);
  }

  .summary-grid,
  .notes-band,
  .detail-band {
    grid-template-columns: 1fr;
  }

  .spots-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 76vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .spots-grid.single {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .spot-card {
    scroll-snap-align: start;
  }

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

@media (max-width: 520px) {
  .status-pill {
    display: none;
  }

  .app-shell {
    width: min(100% - 14px, 1240px);
    padding-top: 8px;
    padding-bottom: 108px;
  }

  .topbar {
    min-height: 54px;
  }

  .brand {
    font-size: 15px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 21px;
  }

  .timeline-panel,
  .spot-map-panel,
  .summary-card,
  .spot-card,
  .detail-band {
    padding: 14px;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .timeline {
    grid-auto-columns: minmax(118px, 42vw);
  }

  .region-tabs {
    grid-auto-columns: minmax(112px, 38vw);
    gap: 8px;
    margin-bottom: 12px;
  }

  .region-tab {
    min-height: 62px;
    padding: 9px 10px;
  }

  .region-tab strong {
    font-size: 12px;
  }

  .day-button {
    min-height: 98px;
    padding: 11px;
  }

  .metrics,
  .map-metrics,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 300px;
  }

  .flow-chip {
    grid-template-columns: auto auto auto 16px;
  }

  .flow-chip span,
  .flow-chip small {
    font-size: 10px;
  }

  .flow-chip strong {
    font-size: 12px;
  }

  .flow-arrow {
    width: 18px;
    height: 18px;
  }

  .flow-arrow.wave-icon::before {
    font-size: 12px;
  }

  .flow-arrow.wind-icon::before {
    font-size: 12px;
  }

  .flow-particle {
    width: 26px;
    height: 1.6px;
  }

  .map-pin {
    min-width: 52px;
    min-height: 30px;
    padding: 5px 7px;
    gap: 5px;
  }

  .pin-dot {
    width: 9px;
    height: 9px;
  }

  .pin-label {
    display: inline;
    font-size: 10px;
  }

  .map-pin:not(.active) {
    width: auto;
    min-width: 52px;
    justify-content: flex-start;
    padding: 5px 7px;
  }

  .map-pin:not(.active) .pin-label {
    display: inline;
  }

  .map-info h2 {
    font-size: 28px;
  }

  .map-name-row {
    gap: 6px;
  }

  .map-info p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.6;
  }

  .map-type-row {
    gap: 6px;
  }

  .default-spot-state {
    margin-top: 4px;
  }

  #aiSummary,
  #windowSummary {
    min-height: 128px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.72;
  }

  .card-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .card-heading strong {
    max-width: 100%;
  }

  .chat-widget {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .chat-widget.open {
    left: 10px;
    right: 10px;
    justify-items: stretch;
  }

  .chat-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .chat-panel[hidden] {
    display: none;
  }

  .chat-messages {
    min-height: 170px;
    max-height: min(42dvh, 360px);
  }

  .chat-launcher span {
    display: none;
  }

  .chat-launcher {
    padding: 7px;
  }

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

  .chat-quick-actions button {
    font-size: 10px;
  }

  .chat-form textarea,
  .chat-form button {
    font-size: 16px;
  }

  .chat-form button {
    width: 100%;
  }
}
