@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk-latin-ext.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk-latin.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  --ink: #0b0b0f;
  --muted: #6b6b73;
  --paper: #ffffff;
  --accent: #cc092f;
  --accent-glow: rgb(204 9 47 / 0.45);
  --land: #f7f7f7;
  --water: #e4e6e9;
  --font: "Space Grotesk", system-ui, sans-serif;
  --gap: clamp(0.5rem, 1.5vw, 1rem);
  --radius: 1.25rem;
}

* {
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  align-items: start;
  gap: var(--gap);
  padding: var(--gap);
}

.card {
  position: relative;
  height: min(80svh, 44rem);
  overflow: clip;
  border-radius: var(--radius);
  background: var(--land);
  container-type: inline-size;
}

.card:not(:has(.card-map)) {
  height: auto;
  min-height: auto;
}

.card:not(:has(.card-map)) .info {
  position: static;
  background: none;
  padding-bottom: clamp(1.25rem, 6cqi, 3.5rem);
}

.dashboard + .dashboard {
  padding-top: 0;
}

main:has(> .dashboard:only-child > .card:only-child) .dashboard {
  padding: 0;
}

main:has(> .dashboard:only-child > .card:only-child) .card:has(.card-map) {
  height: 100svh;
  border-radius: 0;
}

.card-map {
  position: absolute;
  inset: 0;
}

.info {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  padding: clamp(1.25rem, 6cqi, 3.5rem);
  padding-bottom: clamp(2.5rem, 12cqi, 6rem);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.95) 55%, transparent);
}

.label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.time {
  font-size: clamp(4rem, 26cqi, 14rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-left: -0.05em;
}

.window {
  margin-top: 0.75rem;
  font-size: clamp(0.9375rem, 3.2cqi, 1.375rem);
  font-weight: 500;
  color: var(--muted);
}

.runner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--paper), 0 8px 28px var(--accent-glow);
}

.runner svg {
  display: block;
  width: 100%;
  height: 100%;
}

.runner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.45;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.maplibregl-ctrl-attrib {
  font-size: 10px;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .runner::after {
    animation: none;
  }
}

.pin {
  display: grid;
  justify-items: center;
  font-variant-numeric: tabular-nums;
}

.tag {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 4px 16px rgb(0 0 0 / 0.08);
  font-family: var(--font);
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--muted);
}

.tag .name {
  font-weight: 500;
}

.tag .at {
  font-weight: 600;
}

.stem {
  width: 1px;
  height: var(--stem);
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.35), rgb(0 0 0 / 0.05));
}

.pin.hidden {
  visibility: hidden;
}

.pin.read .tag {
  color: var(--ink);
}

.pin.read .stem {
  background: linear-gradient(to bottom, var(--ink), rgb(0 0 0 / 0.1));
}

@media (prefers-reduced-transparency: reduce) {
  .tag {
    background: var(--paper);
    backdrop-filter: none;
  }
}

.empty {
  padding: clamp(2rem, 8vw, 6rem) var(--gap);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--muted);
}

.add {
  padding: 0 var(--gap) var(--gap);
}

.add input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.add input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.add input::placeholder {
  color: var(--muted);
}
