* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.tides-only {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  font-family: Inter, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.92);
  background: radial-gradient(1200px 800px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #141d2a 0%, #2a3950 52%, #6c7c87 100%);
  line-height: 1.45;
}

.tides-only__main {
  width: 100%;
  max-width: 420px;
}

.tides {
  --tides-bg-top: #141d2a;
  --tides-bg-mid: #2a3950;
  --tides-bg-bot: #6c7c87;
  --tides-hair: rgba(255, 255, 255, 0.28);
  --tides-card: rgba(8, 14, 24, 0.28);
  --tides-card-border: rgba(255, 255, 255, 0.14);
  --tides-shadow: rgba(0, 0, 0, 0.35);

  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tides__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.tides__water {
  position: fixed;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background: rgba(6, 24, 54, 1);
}

.tides__water::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.tides__site-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.tides__titleblock {
  text-align: center;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.tides__hero {
  position: relative;
  z-index: 2;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tides__kicker {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 15px;
}

.tides__kicker--level,
.tides__kicker--error {
  margin-top: 8px;
  margin-bottom: 0;
}

.tides__kicker--error {
  max-width: 36ch;
  text-transform: none;
  letter-spacing: 0.04em;
}

.tides__hero-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.tides__time-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  transform: translateX(13px);
}

.tides__time {
  font-weight: 300;
  font-size: 90px;
  letter-spacing: 0.02em;
}

.tides__meridiem {
  font-size: 20px;
  letter-spacing: 0.32em;
  padding-bottom: 20px;
  color: rgba(255, 255, 255, 0.68);
}

.tides__hero-trend-axis {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.tides__hero-trend-arrow {
  font-size: 20px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.62);
}

.tides__trend {
  margin-top: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.tides__timeline {
  position: relative;
  z-index: 2;
  height: 360px;
  margin-top: 4px;
  margin-bottom: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr 1fr;
  align-items: center;
}

.tides__rail {
  grid-column: 2;
  grid-row: 1 / -1;
  justify-self: center;
  width: 2px;
  height: 100%;
  background: var(--tides-hair);
  position: relative;
  overflow: visible;
}

.tides__cap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.08);
}

.tides__cap--top {
  top: 16px;
}

.tides__cap--bottom {
  bottom: 16px;
}

.tides__dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.tides__dot--now::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  height: 1px;
  width: 62px;
  background: var(--tides-hair);
  margin-right: 10px;
}

.tides__marker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px;
}

.tides__marker-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  white-space: nowrap;
}

.tides__marker-time {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 30px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
}

.tides__marker-time::before {
  content: "";
  height: 1px;
  width: 48px;
  background: var(--tides-hair);
  flex: 0 0 auto;
}

.tides__ampm {
  font-size: 14px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.62);
  margin-left: 2px;
}

.tides__marker-subvalue {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  margin-left: calc(48px + 14px);
}

.tides__marker--high,
.tides__marker--low {
  position: relative;
  grid-column: 3;
  align-items: flex-start;
  transform: translateX(-40px);
}

.tides__marker--high {
  grid-row: 1;
}

.tides__marker--low {
  grid-row: 3;
}

.tides__marker--high .tides__marker-label,
.tides__marker--low .tides__marker-label {
  margin-left: calc(48px + 14px);
}

.tides__marker--now {
  position: absolute;
  left: 0;
  right: calc(50% + 78px);
  transform: translateY(-50%);
  align-items: flex-end;
  text-align: right;
}

.tides__marker--now .tides__marker-time--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.tides__marker--now .tides__marker-time::before {
  display: none;
}

.tides__marker-digits {
  font-size: 30px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.05;
}

.tides__marker-meridiem {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.62);
}

.tides__timeline-spacer {
  flex: 0 0 auto;
  min-height: 20px;
  position: relative;
  z-index: 2;
}

.tides__cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: min(100%, 352px);
  margin-inline: auto;
}

.tides__card {
  border-radius: 16px;
  border: 1px solid var(--tides-card-border);
  background: var(--tides-card);
  padding: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px var(--tides-shadow);
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tides__card-title {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.tides__card-value {
  font-size: 20px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
}

.tides__card-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.56);
}

.tides__card--range {
  align-items: flex-end;
  text-align: right;
  padding-top: 10px;
}

.tides__range-icon {
  color: rgba(255, 255, 255, 0.64);
  margin: 8px 0 6px;
}

.tides__card-value--range {
  font-size: 22px;
}

.tides__unit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
}

.tides__credit {
  position: relative;
  z-index: 2;
  margin: 20px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.tides__credit a {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 380px) {
  .tides__time-row {
    transform: translateX(11px);
  }

  .tides__time {
    font-size: 78px;
  }

  .tides__timeline {
    height: 340px;
  }

  .tides__dot--now::after {
    width: 52px;
  }

  .tides__cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .tides__card--range {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tides__water {
    display: none;
  }
}
