/* Bankside
   Layout: the map fills the screen; controls float over it and the
   two other screens slide up as sheets. Water is labelled the way
   OS maps do it (blue italic serif); orange is the float tip. */

@font-face {
  font-family: "Figtree";
  src: url("vendor/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("vendor/fonts/source-serif-4-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* One look everywhere: dark glass controls over the map, like a
   proper outdoor app. The map styles themselves (satellite, OS,
   street) set how water and labels are drawn. */
:root {
  --bg: #0c0e10;          /* behind sheets */
  --surface: #15181b;     /* sheets, cards, popups */
  --surface-2: #1f2327;   /* inputs, quiet fills */
  --glass: rgba(17, 19, 22, 0.86);
  --glass-line: rgba(255, 255, 255, 0.08);
  --ink: #f1f3f4;
  --muted: #9ba4aa;
  --line: #2c3136;
  --float: #ff5a1f;       /* float tip: primary action, anglers' catches */
  --float-ink: #ffffff;
  --water: #6cc4ff;       /* water names and links in the app */
  --water-fill: rgba(80, 170, 240, 0.3);
  --mine: #f1f3f4;
  --spot: #34b37a;
  --danger: #ff6b5b;
  --warn-bg: #3a2a17;
  --warn-line: #7a5527;
  --ok-bg: #143128;
  --ok-line: #2c5a4c;
  --halo: rgba(12, 14, 16, 0.9);
  /* Water names drawn on the map: OS blue on light maps... */
  --label-water: #1a5f9e;
  --label-halo: rgba(255, 255, 255, 0.95);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 -12px 40px rgba(0, 0, 0, 0.6);

  --ui: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --carto: "Source Serif 4", Georgia, "Times New Roman", serif;

  --r-chip: 999px;
  --r-control: 12px;
  --r-sheet: 22px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --dock-h: 64px;
  color-scheme: dark;
}
/* ...and white with a dark halo on satellite photos. */
:root[data-basemap="satellite"] {
  --label-water: #ffffff;
  --label-halo: rgba(0, 18, 32, 0.9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
a { color: var(--water); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------------- Map ---------------- */

#map {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--surface-2);
}
[data-basemap="street"] #map .tiles-street, [data-basemap="os"] #map .tiles-street { filter: brightness(0.86) contrast(1.05) saturate(0.9); }
.leaflet-container { font-family: var(--ui); }
.leaflet-control-zoom { display: none; }   /* pinch / scroll to zoom */
.leaflet-control-attribution {
  background: var(--glass) !important;
  color: var(--muted);
  font-size: 10px;
  border-radius: 8px 0 0 0;
}
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-bottom { bottom: calc(var(--dock-h) + var(--safe-bottom) + 16px); }

/* ---------------- Floating top ---------------- */

.overlay-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: calc(var(--safe-top) + 10px) 12px 0;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.overlay-top > * { pointer-events: auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 16px;
  padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow);
  max-width: 720px;
  width: 100%;
  justify-self: center;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 14px; height: 24px; flex: none; }
.brand h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

.account-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 0;
  border-radius: var(--r-chip);
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  max-width: 50vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 6px;
  max-width: 720px;
  width: 100%;
  justify-self: center;
}
.chips::-webkit-scrollbar { display: none; }
/* Fade the right edge so it's clear the row scrolls. */
@media (max-width: 899px) {
  .chips {
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
    padding-right: 32px;
  }
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: var(--r-chip);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: opacity 0.15s;
}
.chip[hidden] { display: none; }
.chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip:has(input:focus-visible) { outline: 3px solid var(--float); outline-offset: 2px; }
.chip:has(input[type="checkbox"]:not(:checked)) { opacity: 0.55; }
.chip:has(input[type="checkbox"]:not(:checked)) .key { filter: grayscale(1); }

.key { display: inline-block; flex: none; }
.key-water { width: 16px; height: 0; border-top: 3px solid var(--water); border-radius: 2px; }
.key-community { width: 12px; height: 12px; border-radius: 50%; background: var(--float); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.25); }
.key-mine { width: 11px; height: 11px; border-radius: 50%; background: var(--mine); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--mine); }

.chip-select { padding: 0 4px 0 12px; }
.chip-select select {
  font: inherit;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 24px 0 0;
  height: 34px;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 10px top 15px, right 5px top 15px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.chip-select select option { color: #12302c; background: #fff; }

/* ---------------- Floating bottom ---------------- */

.fab-locate {
  position: fixed;
  right: 12px;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 44px);
  z-index: 500;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--water);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.fab-locate svg { width: 22px; height: 22px; }

.map-note {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 22px);
  z-index: 500;
  margin: 0;
  max-width: min(440px, calc(100vw - 96px));
  padding: 8px 14px;
  border-radius: var(--r-chip);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + 10px);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--dock-h);
  padding: 6px;
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
  width: min(420px, calc(100vw - 24px));
}
.dock-btn {
  flex: 1;
  height: 100%;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  cursor: pointer;
}
.dock-btn svg { width: 22px; height: 22px; }
.dock-btn.active { color: var(--ink); background: var(--surface-2); }
.dock-btn.dock-primary { background: var(--float); color: var(--float-ink); flex: 1.15; }
.dock-btn.dock-primary.active { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }

/* ---------------- Sheets ---------------- */

.sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  top: calc(var(--safe-top) + 56px);
  z-index: 800;
  background: var(--surface);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet[hidden] { display: none; }
@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px 20px;
  position: relative;
}
.sheet-head::before {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 36px; height: 4px;
  margin-left: -18px;
  border-radius: 4px;
  background: var(--line);
}
.sheet-head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px calc(var(--dock-h) + var(--safe-bottom) + 32px);
  overscroll-behavior: contain;
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------------- Form ---------------- */

form { display: grid; gap: 22px; }

.group {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.group legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}

.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--r-control);
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--water);
  background: var(--surface);
}
textarea { resize: vertical; min-height: 88px; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 18px top 21px, right 12px top 21px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.weight-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.unit-input { position: relative; }
.unit-input input {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding-right: 44px;
}
.unit-input span {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

.photo-drop {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-control);
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  cursor: pointer;
}
.photo-drop svg { width: 24px; height: 24px; flex: none; color: var(--muted); }
.photo-drop.has-photo { border-style: solid; border-color: var(--spot); background: var(--ok-bg); }
#f-photo:focus-visible + .hint, .field:has(#f-photo:focus-visible) .photo-drop { outline: 3px solid var(--float); outline-offset: 2px; }

#picker-map {
  height: 220px;
  border-radius: var(--r-control);
  overflow: hidden;
  z-index: 0;
}
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.loc-status { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.loc-status.set { color: var(--ink); font-weight: 600; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border-radius: var(--r-control);
  border: 1.5px solid var(--line);
  transition: border-color 0.15s, background 0.15s;
}
.segmented b { font-size: 0.95rem; }
.segmented small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.segmented input:checked + span { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--float); outline-offset: 2px; }
.segmented input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.segmented.three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented.three span { padding: 10px 10px; }
@media (max-width: 360px) { .segmented.three { grid-template-columns: 1fr; } }
.hint.hint-strong { color: var(--ink); }

.hint { margin: 0; font-size: 0.8rem; color: var(--muted); }
.hint.licence { text-align: center; padding: 0 8px; }
.form-msg { margin: -10px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--danger); min-height: 1em; }
.form-msg:empty { display: none; }

.notice {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  font-size: 0.88rem;
}
.notice[hidden] { display: none; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); }

/* ---------------- Buttons ---------------- */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--r-chip);
  border: 0;
  cursor: pointer;
}
.btn-primary { background: var(--float); color: var(--float-ink); min-height: 54px; font-size: 1.02rem; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-quiet { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--water);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------------- Catch list ---------------- */

#catch-list { display: grid; gap: 12px; margin-top: 14px; }

.catch-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.catch-card .thumb {
  width: 76px; height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.catch-card .thumb svg { width: 34px; height: 34px; opacity: 0.6; }
.catch-card .body { min-width: 0; display: grid; gap: 3px; align-content: start; }
.catch-card h3 { font-size: 1.02rem; font-weight: 800; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.catch-card .weight { font-variant-numeric: tabular-nums; color: var(--float); font-weight: 800; }
.catch-card .water { font-family: var(--carto); font-style: italic; font-weight: 600; color: var(--water); }
.catch-card p { margin: 0; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.catch-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.catch-card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.catch-card .actions .btn { min-height: 34px; padding: 6px 12px; font-size: 0.82rem; }
.privacy-pick {
  min-height: 34px;
  width: auto;
  padding: 6px 30px 6px 10px;
  border-radius: var(--r-control);
  border: 1.5px solid var(--line);
  background-color: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  background-position: right 16px top 14px, right 10px top 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  background: var(--surface-2);
  color: var(--muted);
}
.badge.public { background: rgba(255, 90, 31, 0.14); color: #c2410c; }
.badge.warn { background: var(--warn-bg); color: #9a5b12; }
@media all {
  .badge.public { color: #ff9a6b; }
  .badge.warn { color: #f0b46b; }
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
}
.empty svg { width: 54px; height: 54px; color: var(--line); }
.empty p { margin: 0; max-width: 32ch; }

/* ---------------- Map markers and labels ---------------- */

.cell-icon {
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  background: var(--float);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 5px rgba(255, 90, 31, 0.28), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.spot-pin {
  background: none;
  border: 0;
}
.spot-pin::before {
  content: "";
  position: absolute;
  left: 3px; top: 1px;
  width: 24px; height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--float);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.spot-pin::after {
  content: "";
  position: absolute;
  left: 12px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
}
.spot-pin:has(span:not(:empty))::after { display: none; }
.spot-pin span {
  position: absolute;
  left: 3px; top: 3px;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.water-label {
  background: none;
  border: 0;
}
.water-label span {
  position: absolute;
  left: 0; top: 0;
  transform-origin: center;
  white-space: nowrap;
  font-family: var(--carto);
  font-style: italic;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  color: var(--label-water);
  letter-spacing: 0.02em;
  text-shadow: 0 0 1px var(--label-halo), 0 0 2px var(--label-halo), 0 0 3px var(--label-halo), 0 0 4px var(--label-halo);
  pointer-events: none;
}
.water-label.big span { font-size: 15px; letter-spacing: 0.06em; }
.water-label.lake span { font-size: 12.5px; }
.water-label.spot span { color: var(--spot); font-size: 12px; font-family: var(--ui); font-style: normal; font-weight: 700; }

/* Popups */
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 0;
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content {
  margin: 16px 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  min-width: 220px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); top: 8px; right: 8px; font-size: 20px; }

.popup { display: grid; gap: 4px; }
.popup .title { font-size: 1.1rem; font-weight: 800; padding-right: 18px; }
.popup .title.water { font-family: var(--carto); font-style: italic; font-weight: 600; color: var(--water); font-size: 1.2rem; }
.popup .kind { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.popup .small { font-size: 0.85rem; margin: 4px 0 0; }
.popup .muted { color: var(--muted); }
.popup img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-top: 6px; }
.popup .btn-primary { margin-top: 10px; min-height: 44px; font-size: 0.95rem; }
.popup table.mini { border-collapse: collapse; width: 100%; font-size: 0.84rem; font-variant-numeric: tabular-nums; margin-top: 4px; }
.popup table.mini th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); }
.popup table.mini td { padding: 5px 6px 5px 0; border-bottom: 1px solid var(--line); }
.popup table.mini td:first-child { font-weight: 700; }

.cell-list { max-height: 280px; overflow-y: auto; display: grid; margin-top: 6px; }
.cell-item { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.86rem; }
.cell-item b { font-size: 0.95rem; }
.cell-item .wt { color: var(--float); font-variant-numeric: tabular-nums; }
.cell-item .water { font-family: var(--carto); font-style: italic; font-weight: 600; color: var(--water); }
.cell-item .notes { font-style: italic; overflow-wrap: anywhere; color: var(--muted); }
.cell-item .link-btn { justify-self: start; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---------------- Dialogs, toast ---------------- */

dialog {
  border: 0;
  border-radius: var(--r-sheet);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 25, 23, 0.5); backdrop-filter: blur(2px); }
.dialog-body { padding: 22px; display: grid; gap: 12px; }
.dialog-body h2 { font-size: 1.3rem; font-weight: 800; }
.dialog-body p { margin: 0; }
.dialog-body .hint { margin-top: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dialog-body .close { justify-self: center; margin-top: 4px; }

#toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 122px);
  transform: translate(-50%, -8px);
  text-align: center;
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--r-chip);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
  box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Wider screens ---------------- */

@media (min-width: 900px) {
  .sheet {
    top: calc(var(--safe-top) + 72px);
    bottom: 12px;
    left: auto;
    right: 12px;
    width: 440px;
    margin: 0;
    border-radius: var(--r-sheet);
  }
  .sheet-head::before { display: none; }
  .sheet-body { padding-bottom: 28px; }
  .dock { left: 24px; transform: none; width: 380px; }
  .map-note { bottom: calc(var(--safe-bottom) + 24px); left: auto; right: 24px; transform: none; }
  .fab-locate { bottom: calc(var(--safe-bottom) + 80px); right: 24px; }
  .leaflet-bottom { bottom: 0; }
  .overlay-top { padding-inline: 24px; justify-items: start; }
  .topbar, .chips { justify-self: start; max-width: 560px; }
}

/* ---------------- Water filter (segmented chip) ---------------- */

.chip-seg { padding: 3px; gap: 2px; cursor: default; }
.chip-seg label { position: relative; cursor: pointer; }
.chip-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-seg span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-chip);
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.chip-seg input:checked + span { background: var(--ink); color: var(--bg); }
.chip-seg input:checked + span .key-water { border-top-color: currentColor; }
.chip-seg input:focus-visible + span { outline: 3px solid var(--float); outline-offset: 1px; }

.key-fishery {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: var(--spot);
  box-shadow: 0 0 0 2px var(--surface);
}
.chip-action {
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--spot);
  padding: 0 14px 0 10px;
}
.chip-action svg { width: 16px; height: 16px; }

/* ---------------- Fishery markers and popups ---------------- */

.fishery-icon {
  display: grid !important;
  place-items: center;
  border-radius: 9px;
  background: var(--spot);
  color: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.fishery-icon svg { width: 18px; height: 18px; }
.water-label.fishery span {
  font-family: var(--ui);
  font-style: normal;
  font-weight: 800;
  font-size: 12.5px;
  color: #1f7a50;
}

.fishery-popup .kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fishery-popup .listed {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-chip);
  background: var(--ok-bg);
  color: var(--spot);
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 8px 0 2px;
  font-size: 0.85rem;
}
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-chip);
  background: var(--surface-2);
}
.popup .desc { white-space: pre-line; overflow-wrap: anywhere; max-height: 7.5em; overflow-y: auto; }
.popup-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-weight: 700; font-size: 0.88rem; }
.popup .link-btn.report { justify-self: center; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-top: 6px; }

/* ---------------- Fishery form ---------------- */

#fy-picker {
  height: 240px;
  border-radius: var(--r-control);
  overflow: hidden;
  z-index: 0;
}
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; text-transform: uppercase; }
.inline-field .btn { min-height: 48px; }

.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { position: relative; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.check-chip span {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}
.check-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.check-chip input:focus-visible + span { outline: 3px solid var(--float); outline-offset: 2px; }

.declare {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--surface-2);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.declare input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--spot); flex: none; }

#fy-home { display: grid; gap: 14px; }
#fy-home[hidden] { display: none; }
#fishery-list { display: grid; gap: 12px; }
.fishery-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.fishery-card h3 { font-size: 1.05rem; font-weight: 800; }
.fishery-card .badges { display: flex; gap: 6px; margin-top: 2px; }
.fishery-card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fishery-card .actions .btn { min-height: 34px; padding: 6px 12px; font-size: 0.82rem; }

/* ---------------- Fishery photos ---------------- */

.fy-gallery { display: grid; gap: 6px; margin: 0 0 6px; }
/* Keep the popup's close button readable on top of the photo. */
.leaflet-container .leaflet-popup:has(.fy-gallery) a.leaflet-popup-close-button {
  top: 22px; right: 24px; z-index: 2;
  width: 28px; height: 28px; line-height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 18px;
}
.fy-gallery button { position: relative; padding: 0; border: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.fy-gallery button:focus-visible, .fy-record:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.popup .fy-hero img { display: block; width: 100%; height: 150px; max-height: none; margin: 0; border-radius: 0; object-fit: cover; }
.fy-count {
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); color: #fff;
  font-size: 0.72rem; font-weight: 700;
}
.fy-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.popup .fy-strip img { display: block; width: 100%; height: 48px; max-height: none; margin: 0; border-radius: 0; object-fit: cover; }
.fy-strip span {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 800; font-size: 0.85rem;
}
.fy-records { display: grid; gap: 6px; margin-top: 8px; }
.fy-records-head { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fy-record {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center;
  padding: 4px; border: 0; border-radius: 10px; background: var(--surface-2);
  color: var(--ink); font: inherit; text-align: left; cursor: zoom-in;
}
.popup .fy-record img { width: 52px; height: 52px; max-height: none; margin: 0; border-radius: 8px; object-fit: cover; }
.fy-record b { font-size: 0.88rem; }
.fy-record .wt { color: var(--float); font-weight: 800; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.fy-record small { display: block; color: var(--muted); font-size: 0.76rem; }
.fy-records .link-btn { justify-self: start; font-size: 0.8rem; }

/* Owner form */
.label .count { font-weight: 600; color: var(--muted); margin-left: 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo-grid:empty { display: none; }
.photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-tag {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 0.68rem; font-weight: 700;
}
.tile-tag.new { background: var(--spot); }
.tile-remove {
  position: absolute; top: 4px; right: 4px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.62); color: #fff;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.tile-remove:focus-visible { outline: 3px solid var(--float); outline-offset: 1px; }
.file-btn { display: inline-flex; align-items: center; gap: 8px; justify-self: start; cursor: pointer; }
.file-btn svg { width: 20px; height: 20px; }
.field:has(#fy-venue-add:focus-visible) .file-btn,
.record-form:has(#fy-rec-photo:focus-visible) .photo-drop { outline: 3px solid var(--float); outline-offset: 2px; }
.record-list { display: grid; gap: 8px; }
.record-list:empty { display: none; }
.record-row {
  position: relative; display: grid; grid-template-columns: 56px 1fr 30px; gap: 10px; align-items: center;
  padding: 6px; border-radius: 12px; background: var(--surface-2);
}
.record-row img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.record-row b { font-size: 0.92rem; }
.record-row small { display: block; color: var(--muted); font-size: 0.78rem; }
.record-row .tile-remove { position: static; background: var(--line); color: var(--ink); }
.record-form { display: grid; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#fy-record-new { justify-self: start; }

/* Full-screen photo viewer */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: rgba(8, 12, 12, 0.97);
  padding: 56px 12px 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: 100%; }
.lightbox img { max-width: min(100%, 1100px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 8px; }
.lb-caption { margin: 0; color: #f2f5f4; font-size: 0.95rem; text-align: center; max-width: 60ch; }
.lb-count { position: absolute; top: 18px; left: 16px; color: #cfd8d6; font-size: 0.85rem; font-weight: 700; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  font-size: 1.8rem; line-height: 1;
}
.lightbox button:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.lb-close { top: 8px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------------- Tips ---------------- */

.month-chips {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px;
  scrollbar-width: none;
}
.month-chips::-webkit-scrollbar { display: none; }
.month-chip {
  position: relative; flex: none;
  min-width: 52px; min-height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer;
}
.month-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.month-chip:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.now-dot { position: absolute; top: 4px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--float); }
.tips-heading { margin: 4px 0 10px; font-size: 1.15rem; }
.tips-sub { margin: 20px 0 6px; font-size: 0.95rem; }
.tips-notice { margin-bottom: 12px; font-size: 0.86rem; display: block; }
.tip-list { display: grid; gap: 10px; }
.tip-card {
  display: grid; gap: 4px; text-align: left;
  padding: 14px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; cursor: pointer;
}
.tip-card:hover { border-color: var(--muted); }
.tip-card:focus-visible, .tag-btn:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.tip-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tip-name { font-size: 1.02rem; }
.tip-summary { font-size: 0.88rem; color: var(--ink); line-height: 1.4; }
.tip-baits { font-size: 0.82rem; }
.tip-baits .muted { color: var(--muted); font-weight: 600; }
.rating {
  flex: none; padding: 3px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; white-space: nowrap;
}
.rating.r3 { background: var(--spot); color: #fff; }
.rating.r2 { background: var(--ok-bg); color: #1d6b48; }
.rating.r1 { background: var(--surface-2); color: var(--muted); }
.rating.r0 { background: var(--surface-2); color: var(--muted); }
@media all { .rating.r2 { color: #8fd8b3; } }
.tip-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn {
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.recent-bars { display: grid; gap: 6px; margin-top: 6px; }
.recent-row { display: grid; grid-template-columns: 7.5em 1fr 2.5em; gap: 8px; align-items: center; font-size: 0.85rem; }
.recent-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.recent-bar span { display: block; height: 100%; border-radius: 999px; background: var(--float); }
.recent-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }

.tip-detail { display: grid; gap: 8px; }
.tip-detail h3 { margin: 0; font-size: 1.4rem; }
.tip-detail h3:focus { outline: none; }
.tip-detail h4 { margin: 10px 0 0; font-size: 0.92rem; }
.tip-detail p { margin: 0; }
.tip-lead { font-size: 0.95rem; }
.tips-back { justify-self: start; font-weight: 700; }
.month-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 4px; }
.ms {
  display: grid; place-items: center; height: 30px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 800; color: var(--muted);
}
.ms.r3 { background: var(--spot); color: #fff; }
.ms.r2 { background: #8fd0ad; color: #0f3b27; }
.ms.r1 { background: #dcefe4; color: #45685a; }
.ms.r0 { background: var(--surface-2); }
@media all {
  .ms.r3 { background: #4cc98d; color: #08281a; }
  .ms.r2 { background: #2b6b4d; color: #e8f5ee; }
  .ms.r1 { background: #1c332a; color: #a9c9ba; }
  .rating.r3 { background: #4cc98d; color: #08281a; }
}
.dock-btn span { white-space: nowrap; }
@media (max-width: 370px) { .dock-btn { font-size: 0.68rem; } .dock { gap: 2px; padding: 5px; } }
.ms.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.ms-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.74rem; color: var(--muted); }
.ms-key span { display: inline-flex; align-items: center; gap: 5px; }
.ms-key i { width: 12px; height: 12px; border-radius: 3px; }
.tip-points { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.9rem; }
.tip-actions { margin-top: 8px; }
.tips-foot { margin-top: 22px; }


/* ---------------- Map style switcher ---------------- */

.fab-layers { bottom: calc(var(--dock-h) + var(--safe-bottom) + 102px); color: var(--ink); }
.fab-layers[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.fab-locate { border: 1px solid var(--glass-line); }
.layers-panel {
  position: fixed;
  right: 12px;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 160px);
  z-index: 950;
  width: min(330px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}
.layers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.layers-head h2 { font-size: 1rem; }
.layers-head .icon-btn { width: 34px; height: 34px; }
.basemap-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.basemap-card {
  display: grid; gap: 3px; justify-items: start; text-align: left;
  padding: 0 0 8px; border-radius: 14px; overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); color: var(--ink);
  font: inherit; cursor: pointer;
}
.basemap-card[aria-pressed="true"] { border-color: var(--float); }
.basemap-card:disabled { cursor: not-allowed; opacity: 0.55; }
.basemap-card:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.bm-thumb { width: 100%; aspect-ratio: 4 / 3; display: block; background-size: cover; }
.bm-name { font-weight: 800; font-size: 0.85rem; padding: 0 8px; }
.bm-hint { font-size: 0.7rem; line-height: 1.25; color: var(--muted); padding: 0 8px; }
/* Little drawn previews, so they show even before any tiles load. */
.bm-satellite .bm-thumb {
  background:
    radial-gradient(ellipse 34% 26% at 60% 52%, #1d4a5c 0 60%, transparent 62%),
    radial-gradient(circle at 20% 25%, #3f5a2c 0 18%, transparent 19%),
    radial-gradient(circle at 80% 80%, #4c6233 0 22%, transparent 23%),
    linear-gradient(135deg, #5c6b3a, #3c4f2a 55%, #2d3d22);
}
.bm-os .bm-thumb {
  background:
    radial-gradient(ellipse 30% 22% at 58% 50%, #a9d3ee 0 60%, transparent 62%),
    repeating-radial-gradient(circle at 30% 70%, transparent 0 9px, rgba(190, 120, 60, 0.35) 9px 10px),
    linear-gradient(135deg, #f4f1e4, #e8edd6);
}
.bm-street .bm-thumb {
  background:
    radial-gradient(ellipse 30% 22% at 58% 50%, #aad3df 0 60%, transparent 62%),
    linear-gradient(90deg, transparent 47%, #fff 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 30%, #f7d79b 30% 36%, transparent 36%),
    #f2efe9;
}

/* Map credits: one line, tap to read them all. */
#map .leaflet-control-attribution {
  max-width: calc(100vw - 84px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
#map .leaflet-control-attribution.open { white-space: normal; border-radius: 8px 8px 0 0; }


/* =====================================================================
   onX-style controls (14 Oct 2026): everything floats straight on the
   map as dark see-through glass with white icons and a faint ring.
   ===================================================================== */
:root {
  --btn-glass: rgba(20, 22, 24, 0.66);
  --btn-glass-strong: rgba(20, 22, 24, 0.8);
  --btn-ring: rgba(255, 255, 255, 0.16);
  --btn-on: rgba(255, 255, 255, 0.16);
}

/* Top: logo in the middle, account on the right, no bar behind. */
.topbar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}
.brand { grid-column: 2; justify-self: center; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7)); }
.brand h1 { font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.brand-mark path[fill="var(--ink)"] { fill: #fff; }
.brand-mark path[stroke="var(--ink)"] { stroke: #fff; }
.account-btn {
  grid-column: 3;
  width: 48px; height: 48px; padding: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--btn-glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--btn-ring);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.account-btn svg { width: 24px; height: 24px; }
.account-btn .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--float); color: #fff;
  font-weight: 800; font-size: 1rem;
}

/* Filter pills */
.chip {
  height: 38px;
  background: var(--btn-glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--btn-ring);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.chip-select select { color: #fff; }
.chip-seg span { height: 30px; color: rgba(255, 255, 255, 0.85); }
.chip-seg input:checked + span { background: var(--btn-on); color: #fff; box-shadow: inset 0 0 0 1px var(--btn-ring); }
.chip:has(input[type="checkbox"]:not(:checked)) { opacity: 0.6; }
.chip-action { color: #fff; }

/* Round map buttons down the right */
.fab-locate {
  width: 54px; height: 54px;
  right: 12px;
  background: var(--btn-glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--btn-ring);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.fab-locate svg { width: 24px; height: 24px; }
#locate-btn { bottom: calc(var(--dock-h) + var(--safe-bottom) + 30px); }
.fab-layers { bottom: calc(var(--dock-h) + var(--safe-bottom) + 96px); }
.fab-layers[aria-expanded="true"] { background: #fff; color: #111; }
.layers-panel { bottom: calc(var(--dock-h) + var(--safe-bottom) + 162px); }

/* Bottom bar: one glass pill, white icons and labels, the current
   tab lit up. Log catch keeps its orange so it's easy to find. */
.dock {
  background: var(--btn-glass-strong);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--btn-ring);
  border-radius: 999px;
  padding: 6px;
  height: calc(var(--dock-h) + 2px);
}
.dock-btn { color: rgba(255, 255, 255, 0.82); border-radius: 999px; font-weight: 600; }
.dock-btn.active { color: #fff; background: var(--btn-on); }
.dock-btn.dock-primary { background: transparent; color: rgba(255, 255, 255, 0.92); flex: 1; }
.dock-btn.dock-primary.active { background: var(--btn-on); box-shadow: none; }
.dock-btn.dock-primary svg {
  width: 30px; height: 30px; padding: 5px; margin-top: -2px;
  border-radius: 50%; background: var(--float); color: #fff;
}
.map-note { background: var(--btn-glass-strong); border: 1px solid var(--btn-ring); color: #fff; }

/* ---------------- Bankside listings and claims ---------------- */
.fishery-popup .listed.by-bankside { background: rgba(255, 90, 31, 0.16); color: #ffb08f; }
.popup .claim-btn { margin-top: 10px; min-height: 42px; font-size: 0.92rem; }
.admin-box {
  display: grid; gap: 8px;
  margin-bottom: 18px; padding: 14px;
  border-radius: 16px;
  border: 1.5px dashed var(--float);
  background: rgba(255, 90, 31, 0.06);
}
.admin-box h3 { font-size: 1rem; }
.admin-sub { margin: 10px 0 2px; font-size: 0.92rem; }
#my-claims { display: grid; gap: 10px; margin: 6px 0 14px; }
#admin-claims { display: grid; gap: 10px; }
.claim-card .facts { margin: 6px 0; }
.claim-card input[type="text"] { min-height: 42px; margin-top: 8px; }
.claim-card .tip-points { font-size: 0.84rem; color: var(--muted); }

/* ---------------- Leaderboard ---------------- */
.lb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 10px; }
.lb-modes button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.lb-modes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.lb-modes button:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.lb-area { margin: 0 0 14px; font-size: 0.88rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lb-area select { font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 8px; min-height: 36px; }
.lb-tip { margin: -4px 0 10px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); }
.lb-row.me { border-color: var(--float); box-shadow: inset 0 0 0 1px var(--float); }
.lb-species { padding: 8px; }
.lb-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; padding: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lb-open:focus-visible { outline: 3px solid var(--float); outline-offset: 4px; border-radius: 8px; }
.lb-main { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 0.86rem; }
.lb-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sp { font-size: 1rem; }
.lb-name { font-weight: 700; }
.lb-you { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--float); color: var(--float-ink); font-size: 0.7rem; vertical-align: 1px; }
.lb-big { flex: none; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-chev { flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.lb-pos { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; background: var(--surface-2); color: var(--ink); }
.lb-pos-1 { background: #e9b949; color: #2a1d00; }
.lb-pos-2 { background: #c7ccd1; color: #1d2226; }
.lb-pos-3 { background: #c98a55; color: #2a1405; }
.lb-thumb { flex: none; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }
.lb-gap { text-align: center; color: var(--muted); line-height: 0.8; }
.lb-back { margin: 0 0 6px; }
.lb-empty { padding: 18px; border-radius: 16px; border: 1.5px dashed var(--line); text-align: center; }
.lb-empty p { margin: 0 0 12px; color: var(--muted); }
#lb-periods { overflow: visible; flex-wrap: nowrap; }
#lb-periods .month-chip { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 0.8rem; white-space: nowrap; }
.lb-area label { display: inline; margin: 0; font-weight: 400; color: inherit; font-size: inherit; }
.lb-area select { width: auto; flex: none; }
@media (max-width: 380px) { .lb-thumb { width: 44px; height: 44px; } .lb-pos { width: 26px; height: 26px; font-size: 0.82rem; } .lb-row { gap: 8px; padding: 8px 10px; } }

/* ---------------- Sign-in check and account deletion ---------------- */
.human-check { min-height: 65px; margin: 4px 0 10px; }
.human-check:empty { min-height: 0; }
.danger-link { display: block; margin: 14px auto 0; color: #ff8a80; }
.delete-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.5; }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------------- Settings ---------------- */
.weight-inputs .lboz { display: contents; }
.weight-inputs.one { grid-template-columns: 1fr; }
.settings-group { margin: 0 0 18px; }
.settings-group h3 { font-size: 0.95rem; margin: 0 0 6px; }
.settings-group h3 label { font: inherit; color: inherit; }
.settings-group select { width: 100%; }
.home-now { margin: 6px 0 8px; }
.home-now .link-btn { margin-left: 6px; }
.home-field { display: flex; gap: 8px; align-items: stretch; }
.home-field input { flex: 1; min-width: 0; text-transform: uppercase; }
.home-field input::placeholder { text-transform: none; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.92rem; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--float); }
.check-row input:disabled + span { opacity: 0.5; }
.settings-status { min-height: 1.3em; }
.lb-where { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 10px; }
.lb-where button { min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.lb-where button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.lb-where button:focus-visible { outline: 3px solid var(--float); outline-offset: 2px; }

.privacy-link { color: var(--link, #8cc8ff); font-weight: 600; }
.account-links { text-align: center; margin: 14px 0 0; }
