/*
  Tight Lines. The map fills the screen and everything else floats over it on glass.
  The interface is monochrome: the only colour comes from the floats and the water.
  Radius follows hierarchy: sheets are soft, controls are pills, fields sit in between.
*/

:root {
  --bg: #f1f4f5;
  --ink: #0b1a24;
  --muted: rgb(11 26 36 / 0.6);
  --faint: rgb(11 26 36 / 0.1);
  --tint: rgb(11 26 36 / 0.05);
  --tint-strong: rgb(11 26 36 / 0.09);
  --glass: rgb(255 255 255 / 0.9);
  --glass-solid: rgb(255 255 255 / 0.97);
  --hair: rgb(11 26 36 / 0.13);
  --sheen: rgb(255 255 255 / 0.9);
  --primary: #0b1a24;
  --on-primary: #fff;
  --focus: #1b7ea6;
  --danger: #c5282e;
  --danger-wash: rgb(197 40 46 / 0.1);
  --danger-fill: #c5282e;
  --map-bg: #dfe5e8;
  --line: #0b1a24;
  --glow: rgb(120 180 205 / 0.34);
  --callout: rgb(11 26 36 / 0.86);
  --on-callout: #fff;
  --float-line: #0b1a24;
  --float-halo: rgb(255 255 255 / 0.9);
  --shadow: 0 1px 2px rgb(11 26 36 / 0.1), 0 14px 44px rgb(11 26 36 / 0.24);
  --shadow-soft: 0 1px 2px rgb(11 26 36 / 0.1), 0 6px 20px rgb(11 26 36 / 0.18);
  --sans: 'Geist', 'SF Pro Text', system-ui, sans-serif;
  --r-sheet: 28px;
  --r-card: 20px;
  --r-field: 12px;
  --gutter: 16px;
  --rail-offset: 6rem;
  --bar-height: 3.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glide: cubic-bezier(0.3, 1.3, 0.5, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #100b19;
  --ink: #f3eff8;
  --muted: rgb(243 239 248 / 0.62);
  --faint: rgb(243 239 248 / 0.12);
  --tint: rgb(243 239 248 / 0.07);
  --tint-strong: rgb(243 239 248 / 0.12);
  --glass: rgb(38 30 50 / 0.9);
  --glass-solid: rgb(38 30 50 / 0.97);
  --hair: rgb(243 239 248 / 0.16);
  --sheen: rgb(255 255 255 / 0.1);
  --primary: #f3eff8;
  --on-primary: #1b1428;
  --focus: #b9a4f5;
  --danger: #ff7b7f;
  --danger-wash: rgb(255 123 127 / 0.14);
  --danger-fill: #d63a40;
  --map-bg: #100b19;
  --line: #f3eff8;
  --glow: rgb(130 110 200 / 0.28);
  --callout: rgb(243 239 248 / 0.94);
  --on-callout: #1b1428;
  --float-line: #ebe5f2;
  --float-halo: rgb(0 0 0 / 0.55);
  --shadow: 0 1px 2px rgb(8 4 14 / 0.4), 0 18px 56px rgb(8 4 14 / 0.65);
  --shadow-soft: 0 1px 2px rgb(8 4 14 / 0.4), 0 8px 26px rgb(8 4 14 / 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 0.9375rem/1.5 var(--sans);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Glass: every floating surface shares this one material */

.rail,
.topbar,
.dock,
.locate,
.base-layers,
.map-hint,
.leaflet-container .leaflet-control-zoom,
.auth__card {
  border: 0;
  background: var(--glass);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--hair),
    inset 0 1px 0 var(--sheen);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}

@media (prefers-reduced-transparency: reduce) {
  .rail,
  .topbar,
  .dock,
  .locate,
  .base-layers,
  .map-hint,
  .leaflet-container .leaflet-control-zoom,
  .auth__card {
    background: var(--bg);
  }
}

/* The frame */

.app {
  position: relative;
  height: 100dvh;
}

.main,
.pages,
.page {
  height: 100%;
}

.page[hidden] {
  display: none;
}

.page:not(.page--map) {
  animation: page-in 420ms var(--ease);
}

.page--map {
  position: relative;
}

.page--spots,
.page--insights,
.page--scroll {
  overflow-y: auto;
  padding: 6.25rem 2rem 3rem var(--rail-offset);
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

.page--spots > *,
.page--insights > *,
.page--scroll > * {
  max-width: 60rem;
  margin-inline: auto;
}

@keyframes page-in {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px);
  }
}

/* Side menu. A small float glides along a fine line to the page you're on. */

.rail {
  position: fixed;
  top: calc(50% + 2.25rem);
  left: var(--gutter);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 3.75rem;
  padding: 0.875rem 0;
  border-radius: 999px;
  transform: translateY(-50%);
}

.rail__line {
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: 0.5rem;
  width: 1px;
  background: var(--faint);
}

.rail__float {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 16px;
  margin: -8px 0 0 -5.5px;
  transform: translate(var(--float-x, 0), var(--float-y, 0));
  transition: transform 560ms var(--glide);
  pointer-events: none;
}

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

.rail__float svg path:first-child {
  stroke: var(--ink);
}

.rail__float[hidden] {
  display: none;
}

.rail__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.rail__item {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: 0.3125rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 160ms ease-out,
    color 160ms ease-out,
    transform 160ms var(--ease);
}

.rail__item:hover {
  background: var(--tint);
  color: var(--ink);
}

.rail__item:active {
  transform: scale(0.92);
}

.rail__item[aria-current='page'] {
  background: var(--tint-strong);
  color: var(--ink);
}

.rail__item svg {
  width: 1.1875rem;
  height: 1.1875rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail__item:disabled {
  cursor: default;
  opacity: 0.35;
}

/* Labels appear beside the menu on hover or keyboard focus */
.rail__item span {
  position: absolute;
  top: 50%;
  left: calc(100% + 0.875rem);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--callout);
  color: var(--on-callout);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition:
    opacity 140ms ease-out,
    transform 200ms var(--ease);
}

.rail__item:hover span,
.rail__item:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

/* The one solid control in the menu: adding a spot */
#add-center {
  margin-block: 0.375rem;
  background: var(--primary);
  color: var(--on-primary);
}

#add-center:hover:not(:disabled) {
  transform: scale(1.05);
}

#add-center:active:not(:disabled) {
  transform: scale(0.94);
}

:root[data-theme='dark'] .theme-toggle__moon,
:root:not([data-theme='dark']) .theme-toggle__sun {
  display: none;
}

.rail__theme svg {
  transition: transform 500ms var(--ease);
}

.rail__theme:hover svg {
  transform: rotate(20deg);
}

.nav-admin,
.nav-user {
  display: none;
}

.app[data-role='admin'] .nav-admin,
.app[data-role='user'] .nav-user {
  display: grid;
}

.rail__badge {
  position: absolute;
  top: 0.0625rem;
  right: 0.0625rem;
  min-width: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--danger-fill);
  color: #fff;
  font: 600 0.625rem/1rem var(--sans);
  text-align: center;
}

.rail__badge[hidden] {
  display: none;
}

/* Top navigation bar: logo, search and filters, the count, and the account button */

.topbar {
  position: fixed;
  top: var(--gutter);
  right: var(--gutter);
  left: var(--gutter);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--bar-height);
  padding: 0 0.625rem 0 1rem;
  border-radius: 20px;
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: opacity 160ms ease-out;
}

.brand:hover {
  opacity: 0.72;
}

.brand img {
  display: block;
}

.brand h1 {
  margin: 0;
  font: 500 1.0625rem/1 var(--sans);
  letter-spacing: -0.03em;
}

.topbar__filters {
  display: flex;
  flex: 0 1 38rem;
  align-items: center;
  min-width: 0;
  margin-left: 0.5rem;
  padding: 0.125rem;
  border-radius: 999px;
  background: var(--tint);
  transition: box-shadow 180ms ease-out;
}

.topbar__filters:focus-within {
  box-shadow: inset 0 0 0 1px var(--focus);
}

.app:not([data-page='map'], [data-page='spots']) .topbar__filters {
  display: none;
}

.account-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms ease-out;
}

.account-button:hover {
  transform: scale(1.06);
}

.account-button:active {
  transform: scale(0.95);
}

.account-button[aria-current='page'] {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--primary);
}

.account-button svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.spot-search {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}

.spot-search input {
  flex: 1;
  min-width: 0;
  height: 2.25rem;
  padding: 0 0.5rem 0 0;
  border: 0;
  background: transparent;
  outline: none;
}

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

.spot-search input::-webkit-search-cancel-button {
  filter: grayscale(1);
}

.spot-search button {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.spot-search svg,
.locate svg {
  width: 1.0625rem;
  height: 1.0625rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.select {
  position: relative;
  flex: none;
}

.select select {
  height: 2.25rem;
  max-width: 9.5rem;
  padding: 0 1.75rem 0 0.75rem;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 160ms ease-out;
}

.select select:hover:not(:disabled) {
  background: var(--tint);
}

.select select:disabled {
  cursor: default;
  opacity: 0.4;
}

.select select option {
  background: var(--bg);
}

.select::after {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 0.375rem;
  height: 0.375rem;
  border-right: 1.25px solid var(--muted);
  border-bottom: 1.25px solid var(--muted);
  content: '';
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.tally {
  flex: none;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The map, under everything */

.map-area {
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  background: var(--map-bg);
  font: inherit;
}

#map.leaflet-grab {
  cursor: default;
}

.is-placing #map.leaflet-grab {
  cursor: crosshair;
}

#map.leaflet-dragging {
  cursor: grabbing;
}

/* The cast: a rod on the sheet's edge, its line, and the float in flight */

.tight-line {
  position: absolute;
  inset: 0;
  z-index: 800;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tight-line[hidden],
.cast-lure[hidden] {
  display: none;
}

.cast-line,
.cast-rod,
.cast-grip {
  fill: none;
  stroke: var(--line);
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px var(--float-halo));
}

.cast-line {
  stroke-width: 0.9;
}

.cast-rod {
  stroke-width: 1.5;
}

.cast-grip {
  stroke-width: 3;
}

.cast-reel {
  fill: var(--line);
}

/* While the float is in the air, the real one and its figures wait for it to land */
.map-area.is-casting .float.is-selected,
.map-area.is-casting .float.is-dropping,
.map-area.is-casting .spot-callout--tiles {
  visibility: hidden;
  animation: none;
}

.map-area.is-casting .float svg,
.map-area.is-casting .ripple {
  animation: none !important;
}

/* Map controls rise with the sheet, so it never covers them */

.locate {
  position: absolute;
  right: var(--gutter);
  bottom: 7.25rem;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transform: translate(calc(var(--sheet-w, 0px) * -1), calc(var(--sheet-h, 0px) * -1));
  transition: transform 460ms var(--ease);
}

.locate:hover {
  background: var(--glass-solid);
}

.base-layers {
  position: absolute;
  top: calc(var(--gutter) + var(--bar-height) + 0.625rem);
  right: var(--gutter);
  z-index: 1000;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0.1875rem;
  border-radius: 999px;
  transform: translateX(calc(var(--sheet-w, 0px) * -1));
  transition: transform 460ms var(--ease);
}

.base-layers[hidden] {
  display: none;
}

.base-layers label {
  position: relative;
  cursor: pointer;
}

.base-layers input {
  position: absolute;
  opacity: 0;
}

.base-layers span {
  display: block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  transition:
    background-color 180ms ease-out,
    color 180ms ease-out;
}

.base-layers label:hover span {
  color: var(--ink);
}

.base-layers input:checked + span {
  background: var(--tint-strong);
  color: var(--ink);
  font-weight: 500;
}

.base-layers input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* Shown after choosing Add spot */
.map-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.375rem 0.4375rem 0.375rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: hint-in 360ms var(--ease);
}

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

.map-hint button {
  height: 1.875rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tint-strong);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease-out;
}

.map-hint button:hover {
  background: var(--faint);
}

@keyframes hint-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

/* Add spot stays lit while the map is waiting for a click */
#add-center[aria-pressed='true'] {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--primary);
}

/* The question shown after clicking empty map while browsing */
.add-prompt .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 16px;
  background: var(--glass-solid);
  color: var(--ink);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--hair);
}

.add-prompt .leaflet-popup-content {
  width: auto !important;
  margin: 0;
  padding: 0.875rem 1rem 1rem;
  font: 400 0.875rem/1.4 var(--sans);
}

.add-prompt .leaflet-popup-tip {
  background: var(--glass-solid);
  box-shadow: none;
}

.add-prompt p {
  margin: 0 0 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.add-prompt .button {
  height: 2rem;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
}

.leaflet-fade-anim .add-prompt.leaflet-popup {
  transition: opacity 180ms ease-out;
}

.add-prompt__body {
  animation: prompt-in 300ms var(--ease);
}

@keyframes prompt-in {
  from {
    transform: translateY(5px) scale(0.97);
  }
}

.leaflet-bottom.leaflet-right {
  transform: translate(calc(var(--sheet-w, 0px) * -1), calc(var(--sheet-h, 0px) * -1));
  transition: transform 460ms var(--ease);
}

.leaflet-container .leaflet-control-zoom {
  margin: 0 var(--gutter) 1.75rem 0;
  overflow: hidden;
  border-radius: 999px;
}

.leaflet-container .leaflet-control-zoom a {
  width: 2.5rem;
  height: 2.375rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: 300 1.25rem/2.375rem var(--sans);
  transition: background-color 140ms ease-out;
}

.leaflet-container .leaflet-control-zoom a:hover {
  background: var(--tint);
}

.leaflet-container .leaflet-control-attribution {
  padding: 0 0.5rem;
  background: none;
  color: var(--muted);
  font: 400 0.625rem/1.6 var(--sans);
  text-shadow: 0 0 6px var(--bg);
}

.leaflet-container .leaflet-control-attribution a {
  color: inherit;
}

/* Floats */

.float-marker {
  background: none;
  border: 0;
}

.float {
  position: relative;
  width: 44px;
  height: 64px;
}

.float svg {
  position: relative;
  display: block;
  width: 44px;
  height: 64px;
  filter: drop-shadow(0 0 1px var(--float-halo)) drop-shadow(0 3px 5px rgb(0 0 0 / 0.28));
  transform-origin: 50% 88%;
  transition: transform 260ms var(--ease);
}

.float-marker:hover svg {
  transform: scale(1.1);
}

.float.is-selected svg {
  transform: scale(1.12);
  animation: float-settle 900ms var(--ease);
}

.ripple {
  position: absolute;
  left: 4px;
  top: 49px;
  width: 36px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

/* An open spot's float keeps sending out two soft rings, one after the other, until the spot closes */
.float.is-selected .ripple {
  animation: float-ripple-loop 3s 120ms ease-out infinite;
}

.float.is-selected .ripple--late {
  animation-delay: 1620ms;
}

.float.is-dropping svg {
  animation: float-drop 700ms var(--ease) both;
}

.float.is-dropping .ripple {
  animation: float-ripple 1000ms 200ms var(--ease) both;
}

@keyframes float-settle {
  0% {
    transform: scale(1.12) translateY(-6px);
  }
  45% {
    transform: scale(1.12) translateY(2px);
  }
  100% {
    transform: scale(1.12);
  }
}

@keyframes float-drop {
  0% {
    opacity: 0;
    transform: scale(1) translateY(-36px);
  }
  40% {
    opacity: 1;
    transform: scale(1) translateY(3px);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float-ripple-loop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  8% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes float-ripple {
  0% {
    opacity: 0.8;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

/* Spots are fat, square fish until one is opened */

.fish-marker {
  background: none;
  border: 0;
}

.fish {
  width: 44px;
  height: 40px;
}

.fish svg {
  display: block;
  width: 44px;
  height: 40px;
  overflow: visible;
  filter: drop-shadow(0 0 1px var(--float-halo)) drop-shadow(0 3px 5px rgb(0 0 0 / 0.28));
  transition: transform 260ms var(--ease);
}

.fish-marker:hover svg {
  transform: rotate(-7deg) scale(1.1);
}

/*
  The open spot's fish, centred on the spot (the bottom of the 44 x 64 float marker) during the cast.
  When the float lands, it shrinks and moves to the left.
*/
.fish--beside {
  position: absolute;
  top: 36px;
  z-index: 1;
  left: 0;
  transform: translate(-30px, -2px) scale(0.55);
  transition: transform 460ms var(--ease);
}

.map-area.is-casting .fish--beside {
  transform: none;
  transition: none;
}

.float-marker:hover .fish--beside svg {
  transform: none;
}

/* Groups of floats */

.spot-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass-solid);
  color: var(--ink);
  font: 500 0.8125rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px var(--hair);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.spot-cluster span {
  transition: transform 220ms var(--ease);
}

.spot-cluster:hover span {
  transform: scale(1.14);
}

/* Map labels */

.leaflet-tooltip.spot-callout {
  max-width: 16rem;
  padding: 0.375rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: var(--callout);
  color: var(--on-callout);
  box-shadow: var(--shadow-soft);
}

.spot-callout small {
  display: block;
  font: 400 0.75rem/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.spot-callout span {
  display: block;
  overflow: hidden;
  font: 500 0.8125rem/1.35 var(--sans);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
}

.leaflet-tooltip-top.spot-callout::before {
  display: none;
}

/* The selected spot's three figures, as one capsule above its float */

.leaflet-tooltip.spot-callout--tiles {
  display: flex;
  max-width: none;
  padding: 0.4375rem 0.375rem;
  border-radius: 16px;
  animation: callout-in 420ms 100ms var(--ease) both;
}

.spot-callout--tiles div {
  padding: 0 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.spot-callout--tiles div + div {
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--on-callout) 16%, transparent);
}

.spot-callout--tiles strong {
  display: block;
  font: 500 1rem/1.2 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.spot-callout--tiles small {
  display: block;
  color: inherit;
  font: 400 0.6875rem/1.3 var(--sans);
  opacity: 0.66;
}

@keyframes callout-in {
  from {
    opacity: 0;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1.125rem;
  border: 0;
  border-radius: 999px;
  background: var(--tint-strong);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 160ms ease-out,
    opacity 160ms ease-out,
    transform 160ms var(--ease);
}

.button:hover {
  background: var(--faint);
}

.button:active:not(:disabled) {
  transform: scale(0.97);
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button--primary:hover:not(:disabled) {
  background: var(--primary);
  opacity: 0.86;
}

.button--danger {
  background: none;
  color: var(--danger);
}

.button--danger:hover {
  background: var(--danger-wash);
}

.confirm .button--danger,
.confirm .button--danger:hover {
  background: var(--danger-fill);
  color: #fff;
}

.confirm .button--danger:hover {
  opacity: 0.88;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.text-button {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 140ms ease-out;
}

.text-button:hover {
  color: var(--ink);
}

.row-remove {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 140ms ease-out,
    color 140ms ease-out,
    transform 160ms var(--ease);
}

.row-remove:hover {
  background: var(--tint);
  color: var(--ink);
}

.row-remove:active {
  transform: scale(0.9);
}

.row-remove svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* The sheet: one piece of glass, rising over the map */

.dock {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  left: var(--rail-offset);
  z-index: 1050;
  overflow: hidden;
  border-radius: var(--r-sheet);
  animation: sheet-rise 520ms var(--ease);
}

.dock[hidden] {
  display: none;
}

@keyframes sheet-rise {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.985);
  }
}

.dock-error {
  margin: 0;
  padding: 1.25rem 1.75rem;
  color: var(--danger);
}

.dock-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem 1.25rem 0.875rem 1.75rem;
}

.dock h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font: 500 1.75rem/1.1 var(--sans);
  letter-spacing: -0.035em;
}

.dock h2:focus {
  outline: none;
}

.dock-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 1rem;
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.detail-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.detail-kind svg {
  width: 0.9375rem;
  height: auto;
}

.dock-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0 2.75rem;
  padding: 0.25rem 1.75rem 1.5rem;
}

.dock-card {
  max-height: min(30dvh, 15rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

.dock-card h3,
.pricing h3 {
  margin: 1rem 0 0.375rem;
  color: var(--muted);
  font: 400 0.8125rem/1.3 var(--sans);
}

.dock-card > h3:first-child,
.pricing h3:first-child {
  margin-top: 0;
}

/* Figures are the sheet's headline: large, light and unboxed */

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
  margin: 0 0 1.25rem;
}

.tile {
  display: flex;
  flex-direction: column-reverse;
}

.tile small {
  color: var(--muted);
  font-size: 0.8125rem;
}

.tile strong {
  overflow-wrap: anywhere;
  font: 300 2.125rem/1.1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.dock-card--notes p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.dock-card--notes a {
  color: inherit;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms ease-out;
}

.dock-card--notes a:hover {
  text-decoration-color: currentcolor;
}

.confirm p {
  margin: 0 0 0.625rem;
  font-weight: 500;
}

/* Prices */

.pricing ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tickets li,
.addons li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4375rem 0;
  box-shadow: inset 0 -1px 0 var(--faint);
}

.tickets li > span,
.addons li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tickets li small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.tickets li strong,
.addons li strong {
  flex: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Add and edit form */

.dock-form {
  max-height: min(62dvh, 36rem);
  padding: 1.375rem 1.75rem 1.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

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

.field {
  display: block;
  margin-top: 1rem;
}

.field > span,
.field > legend {
  display: block;
  margin-bottom: 0.375rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

fieldset.field {
  margin-inline: 0;
  padding: 0;
  border: 0;
}

.text-input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: var(--r-field);
  background: var(--tint);
  transition:
    background-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.text-input:hover {
  background: var(--tint-strong);
}

.text-input:focus {
  outline: none;
  background: var(--tint);
  box-shadow: 0 0 0 2px var(--focus);
}

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

textarea.text-input {
  height: auto;
  min-height: 6.5rem;
  padding-block: 0.625rem;
  resize: vertical;
}

.kind-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 0.1875rem;
  border-radius: 14px;
  background: var(--tint);
}

.kind-choice label {
  position: relative;
  cursor: pointer;
}

.kind-choice input {
  position: absolute;
  opacity: 0;
}

.kind-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.125rem;
  border-radius: 11px;
  color: var(--muted);
  transition:
    background-color 200ms ease-out,
    color 200ms ease-out,
    box-shadow 200ms ease-out;
}

.kind-choice svg {
  width: 1.0625rem;
  height: auto;
  transition: transform 300ms var(--ease);
}

.kind-choice input:checked + span {
  background: var(--glass-solid);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.kind-choice input:checked + span svg {
  transform: scale(1.14);
}

.kind-choice input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.pricing-rows {
  display: grid;
  gap: 0.5rem;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 2.25rem;
  gap: 0.25rem 0.375rem;
  align-items: center;
  animation: row-in 320ms var(--ease);
}

.addon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem 2.25rem;
  gap: 0.375rem;
  align-items: center;
  animation: row-in 320ms var(--ease);
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.price-row__for {
  color: var(--muted);
  font-size: 0.8125rem;
}

.price-row__note,
.price-row__add-note {
  grid-column: 1 / -2;
}

.price-row__add-note {
  justify-self: start;
  font-size: 0.8125rem;
}

.money {
  position: relative;
}

.money .text-input {
  padding-right: 2.75rem;
  font-variant-numeric: tabular-nums;
}

.money span {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.add-row {
  margin-top: 0.375rem;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 140ms ease-out;
}

.add-row::before {
  content: '+ ';
}

.add-row:hover {
  opacity: 0.66;
}

.position {
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.form-error {
  margin: 0 0 1rem;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
  animation: error-in 300ms var(--ease);
}

@keyframes error-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
}

/* Facilities: single-colour line icons from Lucide, in the ink of the text beside them */

.facility-icon {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facilities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facilities li {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  min-width: 0;
}

.facilities li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.change-row .facilities {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
}

.facility-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.25rem;
  gap: 0.375rem;
  align-items: center;
  animation: row-in 320ms var(--ease);
}

.icon-choice {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--r-field);
  background: var(--tint);
  cursor: pointer;
  transition:
    background-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.icon-choice:hover {
  background: var(--tint-strong);
}

.icon-choice[aria-expanded='true'] {
  background: var(--tint-strong);
  box-shadow: 0 0 0 2px var(--focus);
}

.icon-choice:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

.icon-picker {
  grid-column: 1 / -1;
  padding: 0.5rem;
  border-radius: 14px;
  background: var(--tint);
  animation: row-in 240ms var(--ease);
}

.icon-picker__search {
  height: 2.25rem;
  background: var(--glass-solid);
}

.icon-picker__search:hover,
.icon-picker__search:focus {
  background: var(--glass-solid);
}

.icon-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr));
  gap: 2px;
  max-height: 11.5rem;
  margin-top: 0.375rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

.icon-picker__grid button {
  display: grid;
  place-items: center;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}

.icon-picker__grid button[hidden] {
  display: none;
}

.icon-picker__grid button:hover {
  background: var(--tint-strong);
}

.icon-picker__grid button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.icon-picker__grid button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--glass-solid);
}

.icon-picker__empty {
  margin: 0.625rem 0.25rem 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.facility-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3125rem;
  margin-top: 0.5rem;
}

.pricing-rows:empty + .facility-presets {
  margin-top: 0;
}

.facility-presets .chip[hidden] {
  display: none;
}

.facility-presets .facility-icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

/* Fish chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  height: 1.625rem;
  padding: 0 0.625rem;
  border: 0;
  border-radius: 999px;
  background: var(--tint-strong);
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
}

.chips--small {
  gap: 0.1875rem;
  margin-top: 0.3125rem;
}

.chips--small .chip {
  height: 1.3125rem;
  padding: 0 0.5rem;
  background: var(--tint);
  color: var(--muted);
  font-size: 0.75rem;
}

.chip--button,
.chip--toggle {
  cursor: pointer;
  transition:
    background-color 140ms ease-out,
    color 140ms ease-out,
    transform 160ms var(--ease);
}

.chip--button:hover,
.chip--toggle:hover:not(:disabled) {
  background: var(--faint);
}

.chip--button:active,
.chip--toggle:active:not(:disabled) {
  transform: scale(0.95);
}

.chip--toggle {
  height: 1.875rem;
  background: var(--tint);
}

.chip--toggle small {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.chip--toggle[aria-pressed='true'],
.chip--toggle[aria-pressed='true']:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.chip--toggle[aria-pressed='true'] small {
  color: inherit;
  opacity: 0.7;
}

.chip--toggle:disabled {
  cursor: default;
  opacity: 0.35;
}

/* Fish filter in the top bar */

.topbar__filters {
  position: relative;
}

.fish-filter {
  flex: none;
}

.fish-filter__button {
  position: relative;
  height: 2.25rem;
  max-width: 11rem;
  padding: 0 1.75rem 0 0.75rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease-out;
}

.fish-filter__button::after {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 0.375rem;
  height: 0.375rem;
  border-right: 1.25px solid var(--muted);
  border-bottom: 1.25px solid var(--muted);
  content: '';
  transform: translateY(-70%) rotate(45deg);
  transition: transform 220ms var(--ease);
}

.fish-filter__button[aria-expanded='true']::after {
  transform: translateY(-30%) rotate(225deg);
}

.fish-filter__button:hover:not(:disabled),
.fish-filter__button[aria-expanded='true'] {
  background: var(--tint);
}

.fish-filter__button.is-active {
  background: var(--tint-strong);
  font-weight: 500;
}

.fish-filter__button:disabled {
  cursor: default;
  opacity: 0.4;
}

.fish-filter__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: min(100%, 26rem);
  max-height: min(60dvh, 26rem);
  padding: 0.875rem;
  overflow-y: auto;
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--hair);
  animation: panel-in 260ms var(--ease);
}

.fish-filter__panel[hidden] {
  display: none;
}

.fish-filter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.fish-filter__head .text-button {
  padding: 0;
  font-size: 0.8125rem;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}

/* Fish in the form: chips sit inside the input */

.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--r-field);
  background: var(--tint);
  cursor: text;
  transition:
    background-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.tag-input:hover {
  background: var(--tint-strong);
}

.tag-input:focus-within {
  background: var(--tint);
  box-shadow: 0 0 0 2px var(--focus);
}

.tag-input input {
  flex: 1;
  min-width: 7rem;
  height: 1.625rem;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  outline: none;
}

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

.tag-input input::-webkit-calendar-picker-indicator {
  display: none !important;
}

.chip--tag {
  padding-right: 0.1875rem;
  animation: chip-in 220ms var(--ease);
}

.chip--tag button {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.chip--tag button:hover {
  background: var(--tint-strong);
  color: var(--ink);
}

.chip--tag svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
}

/* Spots page */

.spot-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.spot-card {
  display: grid;
  grid-template-columns: 1.625rem minmax(0, 1fr) auto;
  gap: 0 1rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease-out;
}

.spot-card:hover {
  background: var(--tint);
}

.spot-card:active {
  background: var(--tint-strong);
}

.spot-card > svg {
  display: block;
  width: 1.625rem;
  height: auto;
  transition: transform 300ms var(--ease);
}

.spot-card:hover > svg {
  transform: rotate(-7deg);
}

.spot-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.spot-card small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.spot-card__price {
  text-align: right;
}

.spot-card__price b {
  display: block;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spot-card__price--none b {
  color: var(--muted);
  font-weight: 400;
}

.empty {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

/* Loading */

.skeleton {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.skeleton i {
  display: block;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--tint) 30%, var(--tint-strong) 50%, var(--tint) 70%);
  background-size: 220% 100%;
  animation: skeleton-sheen 1.5s linear infinite;
}

@keyframes skeleton-sheen {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* Insights */

.insight-lede {
  max-width: 20ch;
  margin: 1.5rem 0 3rem;
  font: 300 clamp(2.25rem, 5vw, 4rem)/1.06 var(--sans);
  letter-spacing: -0.045em;
}

.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 0 3.5rem;
}

.insight-cards h2 {
  margin: 0;
  color: var(--muted);
  font: 400 0.875rem/1.3 var(--sans);
}

.rank-list {
  margin: 0.5rem 0 2rem;
  padding: 0;
  counter-reset: rank;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  gap: 0.25rem;
  align-items: baseline;
  padding: 0.625rem 0;
  box-shadow: inset 0 -1px 0 var(--faint);
  counter-increment: rank;
}

.rank-list li::before {
  color: var(--muted);
  content: counter(rank);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.rank-list strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rank-link {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
  transition: opacity 140ms ease-out;
}

.rank-link:hover {
  opacity: 0.62;
}

/* Review and submissions */

.page-heading {
  margin: 0.5rem 0 0.875rem;
  font: 400 1.75rem/1.1 var(--sans);
  letter-spacing: -0.035em;
}

.review-grid + .page-heading {
  margin-top: 2.5rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 25rem), 1fr));
  gap: 0.75rem;
  align-items: start;
}

.review-card {
  padding: 1.25rem 1.375rem;
  border-radius: var(--r-card);
  background: var(--tint);
}

.review-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.review-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font: 500 1.125rem/1.2 var(--sans);
  letter-spacing: -0.025em;
}

.review-card__head .text-button {
  flex: none;
  font-size: 0.8125rem;
}

.review-card__message {
  margin: 0.75rem 0 0;
  overflow-wrap: anywhere;
}

.change-list {
  margin: 0.75rem 0 0;
}

.change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.125rem 1rem;
  padding: 0.5rem 0;
  box-shadow: inset 0 1px 0 var(--faint);
}

.change-row dt {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8125rem;
}

.change-row dd {
  margin: 0;
  max-height: 11rem;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.change-row--single dd {
  grid-column: 1 / -1;
}

.change-row dd small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.change-row__old {
  color: var(--muted);
}

.review-controls {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.625rem;
}

.status {
  flex: none;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--tint-strong);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.status--approved {
  background: var(--primary);
  color: var(--on-primary);
}

.status--rejected {
  background: var(--danger-wash);
  color: var(--danger);
}

/* Account */

.account-cards {
  display: grid;
  gap: 3rem;
  padding-top: 1rem;
}

.account-cards .dock-card {
  max-height: none;
  overflow: visible;
}

.account-cards h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font: 400 1.25rem/1.2 var(--sans);
  letter-spacing: -0.03em;
}

.account-identity h2 {
  font-weight: 300;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.045em;
}

.account-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2.5rem 3rem;
  align-items: start;
}

.account-forms .form-error {
  margin: 0.875rem 0 0;
}

.account-submit {
  margin-top: 1.25rem;
}

.account-signout {
  margin-top: 1.25rem;
}

.auth__hint {
  display: block;
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.people-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.people-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  box-shadow: inset 0 1px 0 var(--faint);
}

.people-list li > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.people-list small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.reset-link {
  display: grid;
  flex-basis: 100%;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.reset-link input {
  width: 100%;
  font-size: 0.8125rem;
}

.account-role {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-role .text-button {
  font-size: 0.8125rem;
}

.site-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.switch {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 1.625rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--tint-strong);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.switch::after {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease;
}

.switch[aria-checked='true'] {
  background: var(--primary);
}

.switch[aria-checked='true']::after {
  background: var(--on-primary);
  transform: translateX(1.125rem);
}

.switch:disabled {
  cursor: default;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .switch,
  .switch::after {
    transition: none;
  }
}

/* Until sign-in is checked, because someone signed out is sent to the landing page instead */
.auth-pending .app {
  visibility: hidden;
}

/* Sign in: fine depth contours, and a line dropping into the deepest water */

.auth {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  overflow-y: auto;
  background: var(--bg);
}

.auth[hidden] {
  display: none;
}

.auth__art {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.auth__art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth__contour {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
  animation: contour-in 1400ms var(--ease) both;
}

/* No non-scaling-stroke here: it would break the dash length the drawing animation relies on */
.auth__line {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.9;
  stroke-dasharray: 1;
  animation: line-cast 1100ms 200ms var(--ease) both;
}

.auth__float {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: auth-float-land 1000ms 760ms var(--ease) both;
}

.auth__ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: auth-ring 1800ms 1040ms var(--ease) both;
}

.auth__ring--late {
  animation-delay: 1320ms;
}

.auth__art.is-settled * {
  animation: none;
}

.auth__art.is-settled .auth__ring {
  opacity: 0;
}

@keyframes contour-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

@keyframes auth-float-land {
  0% {
    opacity: 0;
    transform: translateY(-28px);
  }
  50% {
    opacity: 1;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-ring {
  0% {
    opacity: 0.7;
    transform: scale(0.1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.auth__panel {
  position: relative;
  display: grid;
  justify-items: end;
  align-items: center;
  min-height: 100%;
  padding: 1.5rem clamp(1.5rem, 9vw, 9rem) 1.5rem 1.5rem;
}

.auth__card {
  width: 100%;
  max-width: 23rem;
  padding: 2rem;
  border-radius: var(--r-sheet);
  /* Solid rather than glass: blurring the contours as they animate underneath makes the card's edges flicker */
  background: var(--glass-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: sheet-rise 700ms 240ms var(--ease) both;
}

.auth__card.is-settled {
  animation: none;
}

.auth__wordmark {
  margin: 0 0 1.75rem;
  font: 500 1.0625rem/1 var(--sans);
  letter-spacing: -0.03em;
}

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

.auth__card h2 {
  margin: 0;
  font: 300 2rem/1.08 var(--sans);
  letter-spacing: -0.045em;
}

.auth__lede {
  margin: 0.625rem 0 0.25rem;
  color: var(--muted);
}

.auth__card .form-error {
  margin: 0.875rem 0 0;
}

.auth__submit {
  width: 100%;
  margin-top: 1.5rem;
}

.auth__switch {
  display: block;
  margin: 0.875rem auto 0;
  font-size: 0.875rem;
}

/* Water cursor: an arrow with water moving inside it, following the mouse */

.uses-water-cursor,
.uses-water-cursor * {
  cursor: none !important;
}

.uses-water-cursor input:not([type='radio'], [type='checkbox']),
.uses-water-cursor textarea {
  cursor: text !important;
}

.uses-water-cursor select {
  cursor: default !important;
}

.uses-water-cursor.cursor-dragging,
.uses-water-cursor.cursor-dragging * {
  cursor: grabbing !important;
}

.water-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: none;
  will-change: transform;
  pointer-events: none;
}

.water-cursor.is-visible {
  display: block;
}

.water-cursor__body {
  transform-origin: 1.6px 1.6px;
  transition: transform 140ms var(--ease);
}

.water-cursor.is-pressed .water-cursor__body {
  transform: scale(0.88);
}

.water-cursor svg {
  display: block;
  overflow: visible;
}

.water-cursor__level {
  transition: transform 340ms var(--ease);
}

.water-cursor.is-over-action .water-cursor__level {
  transform: translateY(-6px);
}

.water-cursor.is-placing .water-cursor__level {
  transform: translateY(-3px);
}

.water-cursor__wave--back {
  animation: water-flow-back 4.2s linear infinite;
}

.water-cursor__wave--front {
  animation: water-flow-front 2.8s linear infinite;
}

@keyframes water-flow-front {
  to {
    transform: translateX(22px);
  }
}

@keyframes water-flow-back {
  from {
    transform: translateX(22px);
  }
  to {
    transform: translateX(0);
  }
}

/* After choosing Add spot, a small float sits beside the arrow */
.water-cursor__float {
  position: absolute;
  top: 18px;
  left: 18px;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 160ms ease-out,
    transform 260ms var(--ease);
}

.water-cursor.is-placing .water-cursor__float {
  opacity: 1;
  transform: scale(1);
}

/* Toast */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 2000;
  max-width: calc(100% - 2rem);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--callout);
  color: var(--on-callout);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  animation: toast-in 460ms var(--ease);
}

.toast[hidden] {
  display: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
  }
}

/* Narrower windows */

@media (max-width: 1180px) {
  .brand h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

}

/* Wider windows: spot details are a tall panel on the right */

@media (min-width: 901px) {
  .dock {
    top: calc(var(--gutter) + var(--bar-height) + 0.625rem);
    left: auto;
    display: flex;
    width: 25.5rem;
    background: var(--glass-solid);
    animation-name: panel-slide;
  }

  /* The title and close button stay put, and only the details below them scroll */
  #dock-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
  }

  .dock-head {
    position: static;
    padding: 1.5rem 1rem 1rem 1.625rem;
  }

  .dock h2 {
    font-size: 1.625rem;
  }

  .dock-detail {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 1.75rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.25rem 1.625rem 1.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--faint) transparent;
  }

  .dock-card {
    max-height: none;
    overflow: visible;
  }

  .dock-form {
    flex: 1;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem 1.625rem 1.75rem;
  }

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

  .dock-form__columns > div + div > .field:first-child {
    margin-top: 1rem;
  }
}

@keyframes panel-slide {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.99);
  }
}

@media (max-width: 900px) {
  .dock {
    max-height: 56dvh;
    overflow-y: auto;
  }

  .dock-head {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

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

  .dock-card--main {
    grid-column: 1 / -1;
  }

  .dock-card {
    max-height: none;
    overflow: visible;
  }

  .dock-form {
    max-height: none;
    overflow: visible;
  }

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

  .dock-form__columns > div:last-child {
    grid-column: 1 / -1;
  }

  .tally {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .topbar__filters {
    flex: 1;
  }
}

/* Small screens: the side menu becomes a bar at the thumb, with its line along the top */

@media (max-width: 760px) {
  :root {
    --gutter: 8px;
    --rail-offset: 8px;
  }

  .app {
    --dock-clear: 4.5rem;
  }

  .rail {
    top: auto;
    right: var(--gutter);
    bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    width: auto;
    padding: 0.25rem;
    border-radius: 24px;
    transform: none;
  }

  .rail__line {
    top: 0.1875rem;
    right: 1rem;
    bottom: auto;
    left: 1rem;
    width: auto;
    height: 1px;
  }


  .rail__group {
    display: contents;
  }

  .rail__item {
    flex: 1;
    grid-template-rows: auto auto;
    gap: 0.125rem;
    align-content: center;
    width: auto;
    min-width: 0;
    height: 3.25rem;
    margin: 0;
    border-radius: 18px;
  }

  #add-center {
    flex: 0 0 3rem;
    height: 3rem;
    margin: 0.125rem 0.125rem;
    border-radius: 50%;
  }

  #add-center span {
    position: absolute;
  }

  .rail__item span {
    position: static;
    padding: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-size: 0.625rem;
    font-weight: 400;
    opacity: 1;
    transform: none;
    transition: none;
  }

  #add-center span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .rail__badge {
    right: 0.5rem;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    height: auto;
    padding: 0.4375rem 0.4375rem 0.4375rem 0.75rem;
  }

  .app[data-page='map'] .topbar,
  .app[data-page='spots'] .topbar {
    padding-bottom: 0.25rem;
  }

  .topbar__filters {
    display: contents;
  }

  .tally {
    margin: 0;
  }

  /* Wide enough that the filters can't join this row: only the logo and account button fit beside it */
  .spot-search {
    flex: 1 1 calc(100% - 5.5rem);
    order: 1;
    border-radius: 999px;
    background: var(--tint);
  }

  .spot-search:focus-within {
    box-shadow: inset 0 0 0 1px var(--focus);
  }

  .account-button {
    order: 2;
    margin-left: auto;
  }

  .select,
  .fish-filter {
    order: 3;
  }

  /* A real starting width, or the two filters collapse instead of wrapping to their own row */
  .select,
  .fish-filter {
    flex: 1 1 40%;
    min-width: 0;
  }

  .fish-filter__button {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .fish-filter__panel {
    width: 100%;
  }

  .select select {
    width: 100%;
    max-width: none;
  }

  .page--spots,
  .page--insights,
  .page--scroll {
    padding: 4.5rem 0.875rem 6rem;
  }

  .page--spots {
    padding-top: 7.25rem;
  }

  .map-hint {
    bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  .base-layers {
    top: 6.875rem;
  }

  .locate {
    bottom: 11.75rem;
  }

  .leaflet-bottom.leaflet-right {
    transform: translateY(calc((var(--sheet-h, 0px) + var(--dock-clear)) * -1));
  }

  /* With a sheet open, the selected spot's figures need the room */
  .app:not([data-view='list']) .base-layers,
  .app:not([data-view='list']) .locate,
  .app:not([data-view='list']) .leaflet-control-zoom {
    display: none;
  }

  .dock {
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    max-height: 50dvh;
    border-radius: 24px;
  }

  .dock-head {
    padding: 1rem 0.75rem 0.625rem 1.125rem;
  }

  .dock h2 {
    font-size: 1.375rem;
  }

  .dock-detail {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.125rem 1.125rem 1.25rem;
  }

  .dock-form {
    padding: 1rem 1.125rem 1.25rem;
  }

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

  .tile strong {
    font-size: 1.625rem;
  }

  .tiles {
    gap: 0.5rem 1.5rem;
  }

  .review-card {
    padding: 1rem 1.125rem;
  }

  .auth__panel {
    justify-items: center;
    align-items: end;
    padding: 1rem;
  }

  .auth__card {
    max-width: none;
    padding: 1.5rem;
  }

  .auth__wordmark {
    margin-bottom: 1.25rem;
  }

  .toast {
    bottom: 5.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
