/* Native hidden state must override component display declarations. */
[hidden]{display:none!important}
:root {
  --bg: #f3f7f5;
  --panel: #ffffff;
  --text: #17342b;
  --muted: #6b7f77;
  --brand: #0b6b4f;
  --brand-dark: #07503c;
  --public: #11875d;
  --members: #5b5bd6;
  --line: #dce7e2;
  --shadow: 0 12px 34px rgba(17, 44, 35, 0.18);
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.topbar {
  position: fixed; z-index: 1200; left: 0; right: 0; top: 0; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #ddf4ea; font-size: 22px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.header-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 20px; cursor: pointer; }
.icon-btn:hover { border-color: #b7cec4; }
.filters-panel {
  position: fixed; z-index: 1100; left: 16px; top: 88px; bottom: 16px; width: 320px;
  padding: 18px; overflow: auto; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.section-title { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.field-label { display: block; margin: 15px 0 7px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #567067; }
.text-input, .select-input { width: 100%; padding: 12px 13px; border-radius: 12px; border: 1px solid #cadbd4; background: #fff; color: var(--text); outline: none; }
.text-input:focus, .select-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,107,79,.12); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; background: #edf4f1; border-radius: 12px; }
.segmented button { padding: 9px 6px; border: 0; border-radius: 9px; background: transparent; color: #527067; cursor: pointer; font-size: 13px; font-weight: 700; }
.segmented button.active { color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(11,107,79,.22); }
.legend-card { margin-top: 18px; padding: 13px; border-radius: 14px; background: #f6faf8; border: 1px solid var(--line); }
.legend-title { font-weight: 800; font-size: 13px; margin-bottom: 9px; }
.legend-row { display: flex; gap: 9px; align-items: flex-start; color: #526a62; font-size: 12px; line-height: 1.35; margin: 7px 0; }
.dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 2px; flex: 0 0 11px; }
.public { background: var(--public); }
.members { background: var(--members); }
.notice { margin-top: 14px; font-size: 11px; line-height: 1.45; color: #6d7f79; }
.map-wrap { position: fixed; inset: 72px 0 0 0; }
#map { width: 100%; height: 100%; background: #dfe9e4; }
.result-pill { position: absolute; z-index: 800; right: 16px; top: 16px; padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 12px; font-weight: 800; }
.map-legend { position: absolute; z-index: 800; right: 16px; bottom: 16px; display: flex; gap: 12px; background: rgba(255,255,255,.96); padding: 9px 12px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 12px; font-weight: 700; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.legend-pin { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.details-sheet { position: fixed; z-index: 1300; right: 16px; top: 88px; bottom: 16px; width: min(390px, calc(100% - 32px)); transform: translateX(calc(100% + 30px)); transition: transform .25s ease; background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: auto; border: 1px solid var(--line); }
.details-sheet.open { transform: translateX(0); }
.sheet-close { position: sticky; z-index: 2; float: right; top: 10px; right: 10px; margin: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.96); font-size: 24px; line-height: 1; color: #385149; cursor: pointer; }
.details-head { padding: 22px 22px 8px; }
.details-head h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.4px; }
.details-area { color: var(--muted); font-size: 13px; }
.access-badge { display: inline-flex; align-items: center; gap: 7px; margin-top: 13px; padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: white; }
.details-body { padding: 6px 22px 24px; }
.details-body p { line-height: 1.55; color: #536962; }
.subhead { font-size: 14px; font-weight: 900; margin: 22px 0 8px; }
.fish-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf2ef; }
.fish-main { display: flex; align-items: center; gap: 10px; }
.fish-emoji { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eff7f3; }
.fish-name { font-weight: 800; font-size: 14px; }
.fish-season { font-size: 11px; color: var(--muted); margin-top: 2px; }
.prob { min-width: 66px; text-align: right; }
.prob strong { font-size: 16px; }
.prob span { display: block; margin-top: 1px; font-size: 10px; color: var(--muted); }
.prob-bar { grid-column: 1 / -1; height: 6px; background: #edf2ef; border-radius: 999px; overflow: hidden; }
.prob-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b8d7ca, #0b6b4f); }
.rule-box { margin-top: 16px; border-radius: 13px; background: #f7faf8; border: 1px solid var(--line); padding: 12px; font-size: 12px; line-height: 1.5; color: #567067; }
.leaflet-popup-content-wrapper { border-radius: 13px; }
.popup-title { font-weight: 900; font-size: 14px; margin-bottom: 4px; }
.popup-meta { font-size: 12px; color: #60766e; }
.popup-btn { display: inline-block; margin-top: 8px; padding: 7px 9px; border: 0; border-radius: 8px; color: #fff; background: var(--brand); font-weight: 800; cursor: pointer; }
.custom-marker { width: 24px; height: 24px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.custom-marker span { display: block; width: 6px; height: 6px; margin: 6px; border-radius: 50%; background: rgba(255,255,255,.9); }
/* Online-discovered waters keep the standard FishMap pin silhouette and access colour,
   but use a small upright globe in place of the normal centre dot. */
.custom-marker.online-marker { position: relative; }
.online-marker-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.online-marker-globe svg {
  display: block;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  transform-origin: center;
  fill: none;
  stroke: rgba(255,255,255,.96);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-marker { width: 18px; height: 18px; border-radius: 50%; background: #1b78ff; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.mobile-only { display: none; }
@media (max-width: 760px) {
  .brand-sub { display: none; }
  .topbar { height: 66px; padding-left: 12px; padding-right: 12px; }
  .map-wrap { inset: 66px 0 0 0; }
  .filters-panel { left: 10px; right: 10px; top: 76px; bottom: auto; width: auto; max-height: calc(100vh - 94px); transform: translateY(-130%); transition: transform .22s ease; }
  .filters-panel.open { transform: translateY(0); }
  .details-sheet { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 74vh; transform: translateY(calc(100% + 20px)); border-radius: 20px; }
  .details-sheet.open { transform: translateY(0); }
  .mobile-only { display: inline-grid; place-items: center; }
  .desktop-only { display: none; }
  .result-pill { right: 10px; top: 10px; }
}

/* Search dropdown */
.search-combobox { position: relative; }
.search-suggestions {
  position: absolute;
  z-index: 1500;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 330px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(17, 44, 35, .18);
}
.search-suggestion {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.search-suggestion:hover,
.search-suggestion:focus { background: #edf6f2; outline: none; }
.search-suggestion.all-locations { border-bottom: 1px solid #edf2ef; margin-bottom: 4px; }
.suggestion-main { font-size: 13px; font-weight: 800; }
.suggestion-meta { font-size: 11px; color: var(--muted); }
.search-empty { padding: 12px; color: var(--muted); font-size: 12px; }

/* External links */
.website-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #e9f5f0;
  color: var(--brand-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  border: 1px solid #cce3d9;
}
.website-btn:hover { background: #dff0e9; }
.popup-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.popup-link {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #e9f5f0;
  border: 1px solid #cce3d9;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
}
.estimate-note { margin-top: 12px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }

/* v4 search/radius controls */
.secondary-btn {
  width: 100%;
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #c9ddd4;
  border-radius: 11px;
  background: #f6faf8;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}
.secondary-btn:hover { background: #eaf5f0; }
.popup-area { margin-bottom: 4px; color: #314f45; font-size: 12px; font-weight: 750; }
.popup-distance { margin-top: 5px; color: var(--brand-dark); font-size: 11px; font-weight: 850; }
.details-distance { margin-top: 7px; color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.suggestion-line { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.suggestion-kind {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef4f1;
  color: #5b7169;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.search-centre-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.96);
  border: 3px solid var(--brand);
  box-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.search-centre-marker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: rgba(11,107,79,.20); }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--brand);
  color: #fff;
  font-weight: 850;
}

@media (max-width: 760px) {
  .result-pill {
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* v5 national data layer */
.dot.unknown, .legend-pin.unknown { background: #c47a12; }
.data-status { margin-top: 14px; padding: 10px 11px; border-radius: 12px; font-size: 11px; line-height: 1.35; font-weight: 700; border: 1px solid var(--line); background: #f6faf8; color: #526a62; }
.data-status.loading { background: #f4f7fb; color: #4f6270; }
.data-status.ready { background: #edf8f3; color: #17644b; }
.data-status.warn { background: #fff6e8; color: #8a5a0a; }
.details-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.source-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 10px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: #335149; font-size: 12px; font-weight: 800; }
.popup-link.subtle { background: #f4f7f6; color: #4d625c; }
.unknown-data-box { padding: 13px; border-radius: 12px; background: #fff7ea; border: 1px solid #f0d7a9; color: #745017; line-height: 1.45; font-size: 12px; }
.segmented { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 760px) { .map-legend { display: none !important; } }

.retry-data-btn { width: 100%; margin-top: 8px; }


/* v7 preloaded nationwide data */
.approximate-meta { color: #815a15; font-weight: 800; }
.approx-location-note { margin-top: 10px; padding: 10px 11px; border-radius: 11px; background: #fff6e8; border: 1px solid #efd6a7; color: #775015; font-size: 11px; line-height: 1.45; }

/* v8 arbitrary UK place search + drive-time filtering */
.field-help {
  margin: 6px 2px 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.route-status { min-height: 15px; }
.search-loading::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border: 2px solid #c7ddd4;
  border-top-color: var(--brand);
  border-radius: 50%;
  vertical-align: -1px;
  animation: fishmap-spin .8s linear infinite;
}
.search-error { color: #965317; }
.select-input:disabled { opacity: .62; cursor: wait; }
@keyframes fishmap-spin { to { transform: rotate(360deg); } }

/* v9 catch logging */
body.modal-open { overflow: hidden; }
.primary-btn {
  width: 100%; padding: 12px 14px; border: 0; border-radius: 11px;
  background: var(--brand); color: #fff; font-weight: 850; cursor: pointer;
}
.primary-btn:hover { background: var(--brand-dark); }
.secondary-popup-btn { background: #f1f6f4; color: var(--brand-dark); border: 1px solid #cce0d7; }
.log-catch-here { cursor: pointer; }
.catch-log-modal {
  position: fixed; z-index: 2200; inset: 0; display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(15, 37, 30, .46); backdrop-filter: blur(5px);
}
.catch-log-modal.open { display: flex; }
.catch-log-card {
  width: min(660px, 100%); max-height: min(88vh, 880px); overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 70px rgba(8, 31, 24, .28);
  padding: 20px;
}
.catch-log-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.catch-log-header h2 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.4px; }
.catch-log-kicker { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.catch-log-close { position: static; float: none; margin: 0; flex: 0 0 auto; }
.catch-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.catch-field { display: flex; flex-direction: column; gap: 6px; }
.catch-field > span { color: #567067; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.catch-field input, .catch-field select {
  width: 100%; padding: 11px 12px; border-radius: 11px; border: 1px solid #cadbd4;
  background: #fff; color: var(--text); outline: none;
}
.catch-field input:focus, .catch-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,107,79,.12); }
.weight-inputs { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.catch-form .primary-btn { grid-column: 1 / -1; margin-top: 2px; }
.catch-log-summary { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.catch-list-title { margin-bottom: 2px; }
.catch-log-count { color: var(--muted); font-size: 11px; }
.catch-list { margin-top: 10px; }
.catch-empty { padding: 18px 14px; border-radius: 12px; background: #f7faf8; border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.catch-entry {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 2px; border-bottom: 1px solid #edf2ef;
}
.catch-entry-species { font-weight: 850; font-size: 14px; }
.catch-entry-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.catch-entry-weight { font-weight: 900; color: var(--brand-dark); white-space: nowrap; }
.catch-delete {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: #7d5147; cursor: pointer; font-size: 18px; line-height: 1;
}
.catch-delete:hover { background: #fff4f2; }

@media (max-width: 760px) {
  .catch-log-modal { align-items: flex-end; padding: 8px; }
  .catch-log-card { width: 100%; max-height: 90vh; border-radius: 20px 20px 14px 14px; padding: 18px; }
  .catch-form { grid-template-columns: 1fr; }
  .catch-form .primary-btn { grid-column: auto; }
}

/* v10 favourites + sidebar tabs */
.panel-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 14px;padding:4px;background:rgba(11,107,79,.08);border-radius:12px;position:sticky;top:0;z-index:5;backdrop-filter:blur(8px)}
.panel-tab{border:0;background:transparent;padding:9px 10px;border-radius:9px;font:inherit;font-weight:800;color:#48635a;cursor:pointer}
.panel-tab.active{background:#fff;color:#0b6b4f;box-shadow:0 1px 4px rgba(0,0,0,.10)}
.tab-count{display:inline-flex;min-width:20px;height:20px;padding:0 5px;align-items:center;justify-content:center;border-radius:999px;background:#e8f4ef;color:#0b6b4f;font-size:11px;margin-left:3px}
.side-tab-panel{display:none}.side-tab-panel.active{display:block}.side-tab-panel[hidden]{display:none!important}
.favourites-help{margin-bottom:12px}
.favourites-list{display:flex;flex-direction:column;gap:10px;padding-bottom:24px}
.favourite-empty{padding:18px;border:1px dashed #b9cec6;border-radius:12px;background:#f8fbfa;color:#61756e;line-height:1.45}
.favourite-card{border:1px solid #d9e5e0;background:#fff;border-radius:13px;padding:12px;box-shadow:0 2px 8px rgba(28,61,49,.05)}
.favourite-card-head{display:flex;gap:8px;justify-content:space-between;align-items:flex-start}
.favourite-name{font-weight:850;color:#183c31;line-height:1.2}.favourite-area{font-size:12px;color:#72847d;margin-top:3px}
.favourite-species{font-size:12px;color:#48635a;margin:8px 0;line-height:1.35}
.favourite-actions{display:flex;gap:7px;align-items:center}
.favourite-open,.favourite-toggle,.popup-favourite{border:0;border-radius:9px;padding:8px 10px;font:inherit;font-weight:800;cursor:pointer}
.favourite-open{background:#0b6b4f;color:#fff;flex:1}.favourite-toggle,.popup-favourite{background:#fff3c9;color:#7a5a00;border:1px solid #ead485}
.popup-favourite{padding:6px 9px}.popup-favourite.is-favourite{background:#ffe28a}
.details-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.details-favourite{flex:0 0 auto;border:1px solid #ead485;background:#fff3c9;color:#7a5a00;border-radius:10px;padding:8px 10px;font:inherit;font-weight:850;cursor:pointer}.details-favourite.is-favourite{background:#ffe28a}

/* v11 custom locations, catch photos, weather */
.panel-tabs{grid-template-columns:1fr 1fr 1fr}
.legend-pin.custom,.dot.custom{background:#c026d3!important}
.custom-add-btn{width:100%;margin:0 0 12px}
.custom-location-card{max-width:660px}
.custom-location-form{display:grid;gap:14px}
.location-methods{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:6px 0 8px;padding:4px;background:#eef5f2;border-radius:10px}
.location-method{border:0;background:transparent;border-radius:8px;padding:8px 10px;font:inherit;font-weight:800;color:#526c63;cursor:pointer}
.location-method.active{background:#fff;color:#0b6b4f;box-shadow:0 1px 4px rgba(0,0,0,.10)}
.custom-address-combobox{position:relative}
.custom-address-suggestions{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:1200;max-height:260px}
.custom-resolved{margin-top:8px;padding:9px 10px;border-radius:9px;background:#f6faf8;border:1px solid #d7e5df;color:#526c63;font-size:12px;line-height:1.4}
.custom-resolved.ready{background:#eef8f3;color:#185b45;border-color:#bcdccc}
.custom-card-badge{display:inline-flex;align-items:center;gap:5px;margin-top:6px;padding:4px 7px;border-radius:999px;background:#f8eafd;color:#8f1aa7;font-size:11px;font-weight:800}
.custom-card-actions{display:grid;grid-template-columns:1fr auto auto;gap:6px;margin-top:8px}
.custom-edit,.custom-delete{border:1px solid #d9e5e0;background:#fff;border-radius:9px;padding:8px 10px;font:inherit;font-weight:800;cursor:pointer}
.custom-delete{color:#8b3b37}
.map-pick-banner{position:absolute;top:18px;left:50%;transform:translateX(-50%);z-index:1000;background:#173e34;color:#fff;border-radius:14px;padding:10px 12px;box-shadow:0 8px 24px rgba(0,0,0,.22);display:flex;align-items:center;gap:10px;font-size:12px;max-width:min(92vw,520px)}
.map-pick-banner[hidden]{display:none!important}.map-pick-banner span{opacity:.86}.map-pick-banner button{margin-left:auto;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:#fff;border-radius:8px;padding:6px 8px;font:inherit;font-weight:800;cursor:pointer}
.catch-photo-field{grid-column:1/-1}
.catch-photo-field input[type=file]{padding:8px;background:#f8fbfa}
.catch-entry.has-photo{grid-template-columns:68px 1fr auto auto}
.catch-photo-thumb{width:62px;height:62px;object-fit:cover;border-radius:10px;border:1px solid #d6e2dd;background:#eef3f1;cursor:pointer}
.photo-lightbox{position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;padding:18px}
.photo-lightbox[hidden]{display:none}.photo-lightbox img{max-width:96vw;max-height:90vh;border-radius:12px}.photo-lightbox button{position:absolute;top:max(14px,env(safe-area-inset-top));right:14px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;font-size:26px;cursor:pointer}
.weather-block{margin-top:16px;border-top:1px solid #e5eeea;padding-top:14px}
.weather-current{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:12px;border:1px solid #dbe7e2;background:linear-gradient(180deg,#f8fbfa,#f1f8f5);border-radius:13px}
.weather-icon{font-size:30px}.weather-temp{font-size:24px;font-weight:900;color:#183c31}.weather-condition{font-size:12px;color:#526c63;margin-top:2px}.weather-metrics{display:flex;gap:10px;flex-wrap:wrap;margin-top:7px;color:#5e736b;font-size:11px}
.weather-forecast{display:grid;grid-template-columns:repeat(7,minmax(90px,1fr));gap:7px;overflow-x:auto;padding:8px 1px 3px}
.weather-day{min-width:90px;border:1px solid #dbe7e2;background:#fff;border-radius:11px;padding:9px;text-align:center}.weather-day-name{font-size:11px;font-weight:850;color:#315247}.weather-day-icon{font-size:22px;margin:4px 0}.weather-day-temp{font-size:12px;font-weight:850}.weather-day-rain{font-size:10px;color:#667d74;margin-top:4px}.weather-note{font-size:10px;color:#71847d;margin-top:7px;line-height:1.4}.weather-error{padding:11px;border-radius:10px;background:#fff5ee;color:#87513a;font-size:12px}.weather-loading{padding:11px;border-radius:10px;background:#f6faf8;color:#60756d;font-size:12px}
.coordinate-badge{display:inline-flex;margin-top:7px;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:850;background:#eef5f2;color:#43655a}.coordinate-badge.verified,.coordinate-badge.entrance{background:#e7f6ee;color:#146444}.coordinate-badge.water{background:#e8f4ff;color:#175b88}.coordinate-badge.postcode{background:#eef7ff;color:#285a83}.coordinate-badge.town{background:#eef1fb;color:#43559d}.coordinate-badge.county{background:#fff3df;color:#8a5b18}.coordinate-badge.custom{background:#f8eafd;color:#8f1aa7}

@media (max-width:760px){
  .panel-tabs{grid-template-columns:1fr 1fr 1fr}
  .panel-tab{font-size:11px;padding:8px 5px}
  .tab-count{display:none}
  .map-pick-banner{top:12px;align-items:flex-start;flex-wrap:wrap}
  .map-pick-banner button{margin-left:0}
  .weather-forecast{grid-template-columns:repeat(7,96px)}
  .catch-entry.has-photo{grid-template-columns:58px 1fr auto}
  .catch-entry.has-photo .catch-delete{grid-column:3;grid-row:1/span 2}
  .catch-photo-thumb{width:54px;height:54px}
}

.inline-link-btn{border:0;background:transparent;color:#0b6b4f;font:inherit;font-weight:850;padding:0;text-decoration:underline;cursor:pointer}

.address-card{margin-top:10px;padding:11px 12px;border:1px solid rgba(15,23,42,.10);border-radius:12px;background:rgba(255,255,255,.72);font-size:.88rem;line-height:1.45}.address-card.verified-address{border-left:4px solid #11875d}.address-card.unverified-address{border-left:4px solid #c47a12}.address-warning{display:inline-block;margin-top:4px;color:#8a4b08;font-size:.82rem}.popup-meta{max-width:320px}

.address-source{display:inline-block;margin-top:4px;color:#60736d;font-size:.78rem}.verification-note{color:#6a5b43}


/* v14 optional tackle-shop layer */
.map-layer-card{
  border:1px solid #d9e5e0;background:#f8fbfa;border-radius:13px;padding:11px 12px;margin-bottom:14px;
}
.map-layer-row{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.map-layer-copy{display:flex;align-items:center;gap:10px;min-width:0}
.map-layer-copy strong{display:block;color:#183c31;font-size:13px}
.map-layer-copy small{display:block;color:#6d8179;font-size:11px;line-height:1.35;margin-top:2px}
.map-layer-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e5f2ed;font-size:19px;flex:0 0 auto}
.map-layer-toggle{appearance:none;-webkit-appearance:none;width:42px;height:24px;border-radius:999px;background:#b7c8c1;position:relative;cursor:pointer;transition:.18s ease;flex:0 0 auto;border:0}
.map-layer-toggle::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;top:3px;left:3px;box-shadow:0 1px 4px rgba(0,0,0,.25);transition:.18s ease}
.map-layer-toggle:checked{background:#0b6b4f}
.map-layer-toggle:checked::after{transform:translateX(18px)}
.map-layer-toggle:focus-visible{outline:3px solid rgba(11,107,79,.22);outline-offset:2px}
.map-layer-status{font-size:11px;color:#71827b;margin-top:8px;line-height:1.35}
.shop-key-icon{display:grid;place-items:center;width:16px;height:16px;font-size:13px;flex:0 0 auto}
.legend-shop-icon{font-style:normal;font-size:13px;line-height:1}
.tackle-shop-marker{width:30px;height:30px;display:grid;place-items:center;background:#fff;border:3px solid #0b6b4f;border-radius:9px 9px 9px 2px;box-shadow:0 3px 10px rgba(0,0,0,.28);transform:rotate(-45deg)}
.tackle-shop-marker span{font-size:15px;line-height:1;transform:rotate(45deg);display:block}
.shop-location-note{color:#0b6b4f;font-weight:750}
.shop-type-badge{display:inline-flex;align-items:center;gap:6px;background:#e6f3ee;color:#075b43;border:1px solid #c8e3d9;border-radius:999px;padding:6px 9px;font-size:12px;font-weight:850;margin-top:9px}
.shop-detail-line{padding:10px 0;border-bottom:1px solid #e6eeeb;color:#39584d;font-size:13px;line-height:1.45}
.favourite-website{border:1px solid #bed8cf;background:#eef7f4;color:#075b43;border-radius:9px;padding:8px 10px;font:inherit;font-weight:800;text-decoration:none;white-space:nowrap}
.shop-favourite-card{border-left:4px solid #0b6b4f}

/* v15 trip planner + richer catches + fishing sessions */
.journal-card{width:min(820px,100%)}
.journal-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:16px 0 2px;padding:4px;background:#eef5f2;border-radius:12px}
.journal-tab{border:0;background:transparent;border-radius:9px;padding:9px 12px;font:inherit;font-weight:850;color:#4f6a61;cursor:pointer;position:relative}
.journal-tab.active{background:#fff;color:#0b6b4f;box-shadow:0 1px 4px rgba(0,0,0,.09)}
.journal-panel{display:none}.journal-panel.active{display:block}.journal-panel[hidden]{display:none!important}
.active-session-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e11d48;margin-left:5px;box-shadow:0 0 0 3px rgba(225,29,72,.12)}
.catch-wide{grid-column:1/-1}
.catch-field textarea{width:100%;padding:11px 12px;border-radius:11px;border:1px solid #cadbd4;background:#fff;color:var(--text);outline:none;font:inherit;resize:vertical}
.catch-field textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(11,107,79,.12)}
.compact-btn{padding:9px 10px;margin:0}
.journal-inline-note{padding:10px 12px;border-radius:10px;background:#eef8f3;border:1px solid #c5e2d4;color:#275d4d;font-size:12px;line-height:1.45}
.catch-entry{position:relative}
.catch-entry-main{min-width:0}
.catch-entry-detail{margin-top:5px;font-size:11px;line-height:1.45;color:#587067}
.catch-entry-weather{margin-top:5px;font-size:10px;color:#71847d}
.pb-badge{display:inline-flex;align-items:center;padding:3px 6px;margin-left:6px;border-radius:999px;background:#fff0b8;color:#755500;font-size:9px;font-weight:900;vertical-align:middle}
.active-session-card{margin:14px 0 2px;padding:14px;border:1px solid #b9ddcf;border-radius:14px;background:linear-gradient(180deg,#f2fbf7,#eaf7f1)}
.active-session-title{font-weight:900;color:#173f33}.active-session-meta{font-size:12px;color:#557067;margin-top:4px;line-height:1.45}
.active-session-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.active-session-actions button{border:0;border-radius:9px;padding:8px 10px;font:inherit;font-weight:850;cursor:pointer}
.end-session-btn{background:#173f33;color:#fff}.log-session-catch-btn{background:#fff;border:1px solid #c8ded5!important;color:#175b45}
.session-blank-row{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #d9e5e0;border-radius:10px;background:#f9fbfa;color:#48635a;font-size:12px;font-weight:700}
.session-blank-row input{width:auto!important;margin:0}
.session-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.session-form-actions .primary-btn,.session-form-actions .secondary-btn{margin:0;width:100%}
.session-entry{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:12px 2px;border-bottom:1px solid #edf2ef}
.session-entry-title{font-weight:850;font-size:14px}.session-entry-meta{font-size:11px;color:#667b73;margin-top:2px;line-height:1.45}.session-entry-summary{font-size:11px;color:#3d6054;margin-top:5px}
.blank-badge{display:inline-flex;padding:3px 6px;border-radius:999px;background:#f3f4f6;color:#58646a;font-size:9px;font-weight:900;margin-left:5px}
.session-weather{font-size:10px;color:#71847d;margin-top:5px}
.planner-card{width:min(820px,100%)}
.planner-intro{margin:10px 0 0;color:#5c726a;font-size:12px;line-height:1.55}
.planner-form{padding-bottom:14px}.planner-form .primary-btn{grid-column:1/-1}
.planner-status{margin:12px 0 4px;padding:11px 12px;border-radius:11px;background:#f6faf8;border:1px solid #dce8e3;color:#577068;font-size:12px;line-height:1.45}
.planner-status.loading{background:#eef8f3;color:#1d604a}.planner-status.error{background:#fff3ed;color:#8a4f35;border-color:#f0d2c3}
.planner-results{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.planner-result{display:grid;grid-template-columns:74px 1fr auto;gap:12px;align-items:start;padding:13px;border:1px solid #d9e5e0;border-radius:14px;background:#fff;box-shadow:0 2px 10px rgba(20,58,45,.04)}
.planner-score{width:64px;height:64px;border-radius:16px;background:#eaf7f1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#0b6b4f;font-weight:950;font-size:22px;line-height:1}.planner-score small{font-size:9px;margin-top:4px;color:#587067;text-transform:uppercase;letter-spacing:.05em}
.planner-result-name{font-weight:900;color:#173f33;font-size:15px}.planner-result-area{font-size:11px;color:#71847d;margin-top:2px}.planner-result-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.planner-chip{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f0f5f3;color:#46645a;font-size:10px;font-weight:800}
.planner-breakdown{font-size:10px;color:#667b73;margin-top:7px;line-height:1.45}.planner-explain{font-size:11px;color:#3d6054;margin-top:5px;line-height:1.45}
.planner-open{border:0;border-radius:9px;padding:8px 10px;background:#0b6b4f;color:#fff;font:inherit;font-weight:850;cursor:pointer;white-space:nowrap}
@media (max-width:760px){
  .journal-card,.planner-card{max-height:92vh}
  .catch-wide{grid-column:auto}
  .session-form-actions{grid-template-columns:1fr}
  .planner-result{grid-template-columns:58px 1fr}.planner-score{width:52px;height:52px;font-size:18px}.planner-open{grid-column:1/-1;width:100%}
}

/* v15.2 base-map selector */
.map-style-segment {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  padding:4px;
  background:#edf4f1;
  border-radius:12px;
}
.map-style-segment button {
  min-width:0;
  padding:9px 6px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#527067;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
}
.map-style-segment button.active {
  color:#fff;
  background:var(--brand);
  box-shadow:0 4px 12px rgba(11,107,79,.22);
}
.map-style-segment button:focus-visible {
  outline:3px solid rgba(11,107,79,.2);
  outline-offset:2px;
}


/* v16 live Fishability score + minimum-score filter */
.fishability-filter-card{
  margin-top:14px;padding:11px 12px 10px;border:1px solid #d9e5e0;border-radius:13px;
  background:linear-gradient(180deg,#fbfdfc,#f2f8f5);
}
.fishability-filter-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.fishability-filter-label{margin:0!important}
.fishability-filter-value{display:inline-flex;align-items:center;justify-content:center;min-width:70px;padding:5px 8px;border-radius:999px;background:#e6f4ee;color:#0b6b4f;font-size:11px;font-weight:900}
.fishability-range{width:100%;margin:11px 0 2px;accent-color:var(--brand);cursor:pointer}
.fishability-range-labels{display:flex;justify-content:space-between;color:#7a8d85;font-size:9px;font-weight:750;padding:0 1px}
.fishability-status.loading{color:#17644b}
.fishability-status.warn{color:#8a5a0a}
.popup-fishability{display:flex;align-items:center;gap:6px;margin:7px 0 3px;padding:6px 8px;border-radius:9px;background:#edf8f3;color:#175c46;font-size:11px;font-weight:800}
.popup-fishability strong{font-size:13px;color:#0b6b4f}
.fishability-block{margin-top:16px;border-top:1px solid #e5eeea;padding-top:14px}
.fishability-card{display:grid;grid-template-columns:82px 1fr;gap:13px;align-items:start;padding:13px;border:1px solid #d4e6df;border-radius:14px;background:linear-gradient(180deg,#f8fcfa,#eef7f3)}
.fishability-score{width:76px;height:76px;border-radius:18px;background:#0b6b4f;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:26px;font-weight:950;line-height:1;box-shadow:0 6px 18px rgba(11,107,79,.15)}
.fishability-score small{margin-top:5px;font-size:9px;letter-spacing:.06em;text-transform:uppercase;opacity:.85}
.fishability-title{font-size:15px;font-weight:900;color:#173f33}
.fishability-context{margin-top:2px;font-size:11px;color:#587168;line-height:1.4}
.fishability-behaviour{margin-top:6px;padding:7px 8px;border-radius:9px;background:rgba(255,255,255,.72);color:#46655b;font-size:10px;line-height:1.45}
.fishability-breakdown{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.fishability-factor{display:inline-flex;padding:4px 7px;border-radius:999px;background:#fff;border:1px solid #dbe8e3;color:#49675d;font-size:9.5px;font-weight:800}
.fishability-conditions{margin-top:8px;font-size:10.5px;color:#526c63;line-height:1.45}
.fishability-note{margin-top:7px;font-size:9.5px;color:#758780;line-height:1.45}
.fishability-loading,.fishability-error{padding:11px;border-radius:10px;background:#f6faf8;color:#60756d;font-size:12px}
.fishability-error{background:#fff5ee;color:#87513a}
@media (max-width:760px){.fishability-card{grid-template-columns:68px 1fr}.fishability-score{width:62px;height:62px;border-radius:15px;font-size:22px}}


/* v16.4 catch/session scoring tiers */
.catch-entry-species,.session-entry-title{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.catch-tier-icon,.session-tier-icon{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:7px;background:#f1f6f4;font-size:14px;line-height:1;margin-right:1px}
.catch-tier-badge,.session-tier-badge,.catch-medal{display:inline-flex;align-items:center;padding:3px 6px;border-radius:999px;font-size:9px;font-weight:900;vertical-align:middle;white-space:nowrap}
.catch-tier-badge{background:#eef4f2;color:#405e54;border:1px solid #d9e5e0}
.tier-common{background:#f2f5f4;color:#566a63}.tier-quality{background:#eef5ff;color:#345c84}.tier-notable{background:#edf7f3;color:#23644e}.tier-specimen{background:#f4f0ff;color:#5d4a8c}.tier-trophy{background:#fff5d8;color:#785a00}.tier-exceptional{background:#eef8ff;color:#275f84}.tier-legendary{background:#fff0d6;color:#7b4f00}
.catch-medal{border:1px solid transparent;margin-left:1px}.medal-gold{background:#fff1b7;color:#715100;border-color:#ecd16f}.medal-silver{background:#f0f2f4;color:#53606a;border-color:#d3d8dd}.medal-bronze{background:#f7e7d8;color:#795033;border-color:#dfbea2}
.session-tier-badge{background:#eef5f2;color:#345c4f;border:1px solid #d7e5df}.session-poor{background:#f3f4f6;color:#5f676c}.session-fair{background:#f6f3ed;color:#6e624f}.session-good{background:#eef5ff;color:#355d83}.session-strong{background:#edf8f1;color:#24613f}.session-excellent{background:#fff6d8;color:#765b00}.session-elite{background:#fff0e6;color:#94451e}.session-exceptional{background:#f5edff;color:#68448d}
@media (max-width:760px){.catch-tier-badge,.session-tier-badge,.catch-medal{font-size:8.5px;padding:3px 5px}}

/* v16.5 mapped UK venue metadata */
.mapped-venue-meta{display:flex;flex-wrap:wrap;gap:8px 14px;margin:10px 0 16px;padding:10px 12px;border:1px solid rgba(11,107,79,.14);border-radius:12px;background:rgba(11,107,79,.045);font-size:.86rem;line-height:1.35}.mapped-venue-meta span{display:inline-block}

/* v16.6 optional online fishing-location layer */
.online-water-layer-card{margin-top:10px}
.online-location-disclaimer{margin:10px 0 14px;padding:11px 12px;border-radius:12px;background:#fff6dd;border:1px solid #ead79c;color:#66511a;font-size:.84rem;line-height:1.4}
.popup-online-note{margin-top:5px;color:#765f1b;font-size:.75rem;font-weight:700;line-height:1.3}

/* v17 accounts, profiles, community and privacy */
.account-header-btn{position:relative}.account-online-dot{position:absolute;right:5px;bottom:5px;width:8px;height:8px;border-radius:50%;background:#2cc071;border:2px solid #fff}.admin-header-btn{background:#263c36!important;color:#fff!important}
.social-modal{z-index:1500}.social-card{width:min(880px,calc(100vw - 24px));max-height:min(92vh,940px);overflow:auto}.account-card{width:min(760px,calc(100vw - 24px))}.community-card{width:min(920px,calc(100vw - 24px))}.admin-card{width:min(980px,calc(100vw - 24px))}
.account-backend-notice,.privacy-default-callout,.admin-privacy-banner{margin:0 0 14px;padding:11px 12px;border-radius:12px;font-size:.86rem;line-height:1.45}.account-backend-notice{background:#fff6dd;border:1px solid #ead79c;color:#66511a}.privacy-default-callout{background:#eef8f4;border:1px solid #cfe5da;color:#315f50}.admin-privacy-banner{background:#edf6ff;border:1px solid #cfe0f0;color:#36556e}
.account-value-prop{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;padding:14px;border:1px solid #dbe8e3;background:#f7fbf9;border-radius:14px;color:#49645b}.account-value-prop strong{font-size:1rem;color:#173f33}.account-value-prop .primary-btn{align-self:flex-start;margin-top:8px}
.social-tabs{display:flex;gap:6px;overflow:auto;margin:0 0 14px;padding:4px;background:#edf4f1;border-radius:12px}.social-tab{border:0;border-radius:9px;background:transparent;padding:9px 12px;font-weight:850;color:#557068;cursor:pointer;white-space:nowrap}.social-tab.active{background:#fff;color:#0b6b4f;box-shadow:0 2px 8px rgba(33,67,56,.1)}
.social-form{display:grid;gap:12px}.social-form label{display:grid;gap:6px;color:#435f56;font-size:.83rem;font-weight:780}.social-form input,.social-form select,.social-form textarea,.settings-card select,.composer-card textarea,.composer-card select,.people-search-form input{width:100%;box-sizing:border-box;border:1px solid #cfded8;border-radius:10px;background:#fff;padding:10px 11px;font:inherit;color:#263f37}.social-form textarea,.composer-card textarea{resize:vertical}.social-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.consent-row{grid-template-columns:auto 1fr!important;align-items:start!important;font-weight:600!important}.consent-row input{width:auto!important;margin-top:3px}.consent-row a,.privacy-links a{color:#0b6b4f}.text-action{border:0;background:transparent;color:#0b6b4f;text-decoration:underline;cursor:pointer;padding:4px 0;text-align:left}.social-status{min-height:20px;margin-top:8px;font-size:.82rem;color:#667b74}.social-status.success{color:#176a4c}.social-status.error{color:#a03e35}.social-status.loading{color:#365f7c}
.profile-hero{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin-bottom:14px}.profile-avatar{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:#e9f4ef;border:1px solid #cfe3da;font-size:28px;overflow:hidden}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-hero-copy{display:flex;flex-direction:column;min-width:0}.profile-hero-copy strong{font-size:1rem;color:#173f33}.profile-hero-copy span,.profile-hero-copy small{color:#6b8078;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-btn{padding:8px 10px!important}.account-tab-panel,.community-panel{min-height:180px}.profile-stats-grid,.admin-metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.profile-stat,.admin-metric{padding:12px;border:1px solid #dbe7e2;border-radius:12px;background:#f8fbfa}.profile-stat strong,.admin-metric strong{display:block;font-size:1.15rem;color:#153e32}.profile-stat span,.admin-metric span{font-size:.72rem;color:#72857e}.settings-card{margin-top:12px;padding:14px;border:1px solid #dbe7e2;border-radius:14px;background:#fbfdfc}.settings-card h3,.admin-section h3{margin:0 0 6px;color:#173f33}.settings-card p{margin:0 0 12px;color:#61766e;line-height:1.5;font-size:.85rem}.settings-actions{display:flex;gap:8px;flex-wrap:wrap}.settings-toggle{display:flex!important;align-items:center!important;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #e4ece8}.settings-toggle span{display:flex;flex-direction:column;gap:2px}.settings-toggle small{font-weight:500;color:#71847d}.settings-toggle input{width:auto!important}.danger-btn{border:1px solid #d7a8a3;background:#fff3f1;color:#9a352d;border-radius:10px;padding:10px 13px;font-weight:850;cursor:pointer}.privacy-links{display:flex;gap:14px;flex-wrap:wrap;margin:14px 2px 2px;font-size:.8rem}.compact-social-form{gap:9px}
.composer-card{display:grid;gap:9px;margin-bottom:12px;padding:12px;border:1px solid #d7e5df;background:#f8fbfa;border-radius:14px}.composer-controls{display:flex;justify-content:space-between;gap:8px;align-items:center}.composer-controls select{max-width:220px}.community-feed,.groups-list,.people-results,.admin-users-list,.admin-reports-list{display:grid;gap:9px}.social-post,.group-card,.person-card,.admin-user-row,.admin-report-row{padding:12px;border:1px solid #dbe7e2;border-radius:13px;background:#fff}.social-post-head,.group-head,.person-head,.admin-user-row,.admin-report-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.social-post-author,.person-name,.group-name{font-weight:900;color:#173f33}.social-post-meta,.person-meta,.group-meta,.admin-meta{font-size:.73rem;color:#788982}.social-post-body{margin:9px 0;color:#334e45;line-height:1.5;white-space:pre-wrap}.social-post-actions,.group-actions,.person-actions{display:flex;gap:7px;flex-wrap:wrap}.social-mini-btn{border:1px solid #d7e4df;background:#f8fbfa;color:#365c50;border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:800;cursor:pointer}.social-mini-btn.active{background:#e6f4ee;color:#0b6b4f}.comment-list{display:grid;gap:5px;margin-top:8px}.comment-item{padding:7px 9px;border-radius:9px;background:#f4f8f6;font-size:.8rem;color:#445f56}.comment-form{display:flex;gap:6px;margin-top:7px}.comment-form input{flex:1;border:1px solid #d4e2dc;border-radius:9px;padding:7px 9px}.group-toolbar{display:flex;justify-content:flex-end;margin-bottom:9px}.group-create-form{margin-bottom:12px;padding:12px;border:1px solid #dbe7e2;border-radius:13px;background:#f8fbfa}.active-group-panel{margin-top:12px;padding-top:12px;border-top:1px solid #dbe7e2}.people-search-form{display:flex;gap:8px;margin-bottom:10px}.people-search-form input{flex:1}.profile-visibility-chip,.group-visibility-chip,.role-chip,.status-chip{display:inline-flex;padding:3px 7px;border-radius:999px;background:#eef4f2;color:#49665c;font-size:.68rem;font-weight:850}.role-chip.admin{background:#efeaff;color:#604794}.role-chip.moderator{background:#eef5ff;color:#3d6083}.group-visibility-chip.private{background:#fff4df;color:#785c22}
.admin-section{margin-top:18px}.admin-user-row,.admin-report-row{align-items:center}.admin-user-main,.admin-report-main{display:flex;flex-direction:column;gap:2px;min-width:0}.admin-user-row .social-mini-btn{flex:none}
@media (max-width:760px){.social-card{width:calc(100vw - 12px);max-height:96vh}.social-form-grid{grid-template-columns:1fr}.profile-hero{grid-template-columns:auto 1fr}.profile-hero .compact-btn{grid-column:1/-1}.profile-stats-grid,.admin-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.composer-controls{align-items:stretch;flex-direction:column}.composer-controls select{max-width:none}.people-search-form{flex-direction:column}}


/* v17.0.4 device-aware responsive UI */
.stay-signed-in-row{display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;align-items:start!important;gap:10px!important;font-weight:650!important;cursor:pointer;padding:2px 0 4px}
.social-form .stay-signed-in-row input[type="checkbox"]{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:2px 0 0!important;justify-self:start;align-self:start;accent-color:var(--brand)}
.stay-signed-in-copy{display:flex!important;flex-direction:column;gap:2px;min-width:0}
.stay-signed-in-row strong{font-size:.85rem;color:#334f46;line-height:1.2}
.stay-signed-in-row small{font-size:.74rem;line-height:1.35;color:#74877f;font-weight:500}

body.device-mobile .topbar{height:62px;padding:max(8px,env(safe-area-inset-top)) 8px 7px;gap:6px}
body.device-mobile .brand{gap:7px;min-width:0}
body.device-mobile .brand-mark{width:38px;height:38px;border-radius:12px;font-size:20px}
body.device-mobile .brand-name{font-size:18px}
body.device-mobile .brand-sub{display:none}
body.device-mobile .header-actions{gap:4px;margin-left:auto}
body.device-mobile .icon-btn{width:38px;height:38px;border-radius:11px;font-size:18px}
body.device-mobile #tripPlannerBtn,body.device-mobile #locateBtn{display:none}
body.device-mobile .map-wrap{inset:62px 0 0}
body.device-mobile .filters-panel{top:70px;left:6px;right:6px;max-height:calc(100dvh - 78px);border-radius:18px;padding:14px}
body.device-mobile .catch-log-modal{align-items:flex-end;padding:0;background:rgba(15,37,30,.38)}
body.device-mobile .catch-log-card,body.device-mobile .social-card,body.device-mobile .account-card,body.device-mobile .community-card,body.device-mobile .admin-card{width:100%;max-width:none;max-height:calc(100dvh - max(6px,env(safe-area-inset-top)));height:auto;border-radius:22px 22px 0 0;border-bottom:0;padding:16px 14px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -16px 50px rgba(8,31,24,.24)}
body.device-mobile .social-card{min-height:min(78dvh,720px)}
body.device-mobile .catch-log-header{position:sticky;top:-16px;z-index:20;margin:-16px -14px 10px;padding:14px 14px 10px;background:rgba(255,255,255,.97);backdrop-filter:blur(12px);border-bottom:1px solid #edf2ef}
body.device-mobile .catch-log-header h2{font-size:22px}
body.device-mobile .sheet-close{width:40px;height:40px;min-width:40px;min-height:40px}
body.device-mobile .primary-btn,body.device-mobile .secondary-btn,body.device-mobile .danger-btn{min-height:46px;font-size:15px}
body.device-mobile .social-tab{min-height:42px;padding:10px 11px}
body.device-mobile .social-tabs{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
body.device-mobile .social-tabs::-webkit-scrollbar{display:none}
body.device-mobile .social-form input,body.device-mobile .social-form select,body.device-mobile .social-form textarea,body.device-mobile .settings-card select,body.device-mobile .composer-card textarea,body.device-mobile .composer-card select,body.device-mobile .people-search-form input{min-height:46px;font-size:16px;padding:11px 12px}
body.device-mobile .social-form textarea,body.device-mobile .composer-card textarea{min-height:96px}
body.device-mobile .social-form-grid{grid-template-columns:1fr}
body.device-mobile .profile-hero{grid-template-columns:auto 1fr}
body.device-mobile .profile-hero .compact-btn{grid-column:1/-1}
body.device-mobile .profile-stats-grid,body.device-mobile .admin-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.device-mobile .composer-controls,body.device-mobile .people-search-form{flex-direction:column;align-items:stretch}
body.device-mobile .composer-controls select{max-width:none}
body.device-mobile .admin-user-row,body.device-mobile .admin-report-row,body.device-mobile .social-post-head,body.device-mobile .group-head,body.device-mobile .person-head{flex-direction:column;align-items:stretch}
body.device-mobile .social-post-actions,body.device-mobile .group-actions,body.device-mobile .person-actions{gap:8px}
body.device-mobile .social-mini-btn{min-height:38px;padding:8px 11px}
body.device-mobile .comment-form{flex-direction:column}
body.device-mobile .comment-form input{min-height:44px;font-size:16px}
body.device-mobile .result-pill{max-width:calc(100vw - 20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.device-mobile .details-sheet{left:0;right:0;bottom:0;width:100%;max-height:80dvh;border-radius:22px 22px 0 0;border-bottom:0}

body.device-tablet .social-card{width:min(92vw,880px);max-height:90dvh}
body.device-tablet .filters-panel{width:300px}
body.device-desktop .mobile-only{display:none!important}


/* v17.0.5 profile avatars */
.avatar-editor{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid #dbe7e2;border-radius:14px;background:#f8fbfa}
.avatar-editor-preview{width:76px;height:76px;min-width:76px;border-radius:22px;font-size:32px}
.avatar-editor-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.avatar-upload-btn{display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer;margin:0!important;width:auto!important}
.avatar-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.social-identity{display:flex;align-items:center;gap:9px;min-width:0}
.social-avatar,.person-avatar,.comment-avatar{display:grid;place-items:center;flex:0 0 auto;overflow:hidden;background:#e9f4ef;border:1px solid #cfe3da;color:#2f6755;font-weight:900}
.social-avatar{width:40px;height:40px;border-radius:13px;font-size:15px}
.person-avatar{width:48px;height:48px;border-radius:15px;font-size:17px}
.comment-avatar{width:28px;height:28px;border-radius:9px;font-size:11px}
.social-avatar img,.person-avatar img,.comment-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.comment-with-avatar{display:flex;align-items:flex-start;gap:7px}
@media(max-width:700px){.avatar-editor{align-items:flex-start}.avatar-editor-controls{flex-direction:column;align-items:stretch;flex:1}.avatar-editor-controls .secondary-btn{width:100%!important}.avatar-editor-preview{width:70px;height:70px;min-width:70px}.social-identity{align-items:flex-start}}

/* === FishMap v17.1 modern UI refresh === */
:root{
  --bg:#eef4f6;--panel:#fff;--text:#102b38;--muted:#6c7e87;--brand:#0ba68b;--brand-dark:#08745f;
  --accent:#1689e8;--public:#0ba68b;--members:#5d6ce6;--line:#dbe6ea;
  --shadow:0 18px 50px rgba(8,38,53,.16);--shadow-soft:0 8px 24px rgba(8,38,53,.10);
  --navy:#082635;--navy-2:#0b3445;--radius:18px;
}
body{background:var(--bg)}
.topbar{height:68px;padding:10px 18px;background:linear-gradient(110deg,rgba(7,31,43,.98),rgba(9,49,65,.97));border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 6px 24px rgba(4,23,32,.18);color:#fff}
.brand{gap:11px}.brand-mark{width:43px;height:43px;padding:3px;border-radius:13px;background:rgba(255,255,255,.07);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.brand-mark img{display:block;width:100%;height:100%}.brand-name{font-size:22px;letter-spacing:-.65px;color:#fff}.brand-name::first-letter{color:#fff}.brand-sub{color:#a8c1ca;font-size:11px;letter-spacing:.02em}
.header-actions{gap:7px}.icon-btn{width:42px;height:42px;border-radius:13px;border:1px solid rgba(255,255,255,.11);background:rgba(255,255,255,.07);color:#fff;box-shadow:none;transition:.18s ease}
.icon-btn:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.2);transform:translateY(-1px)}
.map-wrap{inset:68px 0 0}.filters-panel{top:84px;left:14px;bottom:14px;width:326px;padding:16px;background:rgba(250,253,253,.96);border:1px solid rgba(255,255,255,.85);border-radius:22px;box-shadow:var(--shadow);backdrop-filter:blur(18px)}
.panel-tabs{padding:4px;background:#e8f0f2;border-radius:14px;gap:3px}.panel-tab{border-radius:11px!important;font-weight:800!important}.panel-tab.active{background:#fff!important;color:var(--navy)!important;box-shadow:0 4px 14px rgba(8,38,53,.10)!important}
.section-title{font-size:20px;letter-spacing:-.35px;color:var(--navy);margin-top:16px}.field-label{color:#657983;letter-spacing:.055em}.text-input,.select-input{border:1px solid #d6e3e7;background:#f9fbfc;border-radius:13px;min-height:44px}.text-input:focus,.select-input:focus{background:#fff;border-color:#2ab69f;box-shadow:0 0 0 4px rgba(11,166,139,.11)}
.segmented{background:#e8f0f2;border-radius:13px}.segmented button{border-radius:10px}.segmented button.active{background:linear-gradient(135deg,#0ba68b,#0b8fae);box-shadow:0 5px 14px rgba(11,166,139,.23)}
.secondary-btn,.primary-btn{border-radius:13px!important;min-height:44px}.primary-btn{background:linear-gradient(135deg,#0ba68b,#0b8fae)!important;box-shadow:0 7px 18px rgba(11,166,139,.20)}
.legend-card,.rule-box{background:#f6fafb;border-color:#e1eaed;border-radius:15px}.result-pill{top:14px;right:14px;background:rgba(255,255,255,.94);border:1px solid rgba(255,255,255,.8);box-shadow:var(--shadow-soft);backdrop-filter:blur(12px);color:var(--navy)}
.map-legend{border-radius:14px;box-shadow:var(--shadow-soft);border:1px solid rgba(255,255,255,.75)}
.details-sheet{top:84px;bottom:14px;right:14px;border-radius:22px;border:1px solid #e2eaed;box-shadow:var(--shadow)}.details-head h2{color:var(--navy);font-size:26px}.sheet-close{border:0;background:#eef4f6;color:var(--navy);box-shadow:none}
.search-suggestions{border:1px solid #dbe6ea;border-radius:15px;box-shadow:var(--shadow-soft)}.search-suggestion{border-radius:11px}.search-suggestion:hover,.search-suggestion:focus{background:#edf8f6}
.website-btn{background:#e9f8f5;border-color:#c8eae3;color:#08745f;border-radius:12px}.popup-btn{background:linear-gradient(135deg,#0ba68b,#0b8fae);border-radius:10px}
/* Modernise modal/sheet surfaces without changing their behaviour */
.account-modal-card,.community-modal-card,.admin-modal-card,.catch-log-card,.planner-card,.session-card,.modal-card{border-radius:24px!important;border:1px solid #e2eaed!important;box-shadow:0 28px 80px rgba(8,38,53,.24)!important}
.catch-log-kicker{color:#0b9a82!important;letter-spacing:.08em!important}.account-tab,.community-tab,.admin-tab{border-radius:10px!important}.account-tab.active,.community-tab.active,.admin-tab.active{color:#0b8f78!important}
.profile-avatar,.social-avatar,.comment-avatar{box-shadow:0 0 0 3px #fff,0 4px 14px rgba(8,38,53,.14)}
/* Leaflet controls */
.leaflet-bar{border:0!important;box-shadow:var(--shadow-soft)!important}.leaflet-bar a{border-color:#e3eaed!important;color:var(--navy)!important}.leaflet-control-zoom a:first-child{border-radius:12px 12px 0 0!important}.leaflet-control-zoom a:last-child{border-radius:0 0 12px 12px!important}
@media(max-width:760px){
 .topbar{height:60px;padding:7px 10px}.map-wrap{inset:60px 0 0}.brand-mark{width:38px;height:38px;border-radius:12px}.brand-name{font-size:19px}.header-actions{gap:5px}.icon-btn{width:39px;height:39px;border-radius:12px;font-size:18px}
 .filters-panel{top:68px;left:7px;right:7px;max-height:calc(100dvh - 76px);padding:14px;border-radius:20px}.details-sheet{left:6px;right:6px;bottom:6px;max-height:78dvh;border-radius:24px 24px 18px 18px}
 .result-pill{top:9px;right:8px}.map-legend{display:none}.section-title{font-size:19px}.text-input,.select-input{font-size:16px}
 .account-modal-card,.community-modal-card,.admin-modal-card,.catch-log-card,.planner-card,.session-card,.modal-card{border-radius:24px 24px 0 0!important}
}

/* v17.1.1 group search */
.group-search-form{display:flex;gap:8px;margin-bottom:10px}.group-search-form input{flex:1;min-width:0;width:100%;box-sizing:border-box;border:1px solid #cfded8;border-radius:12px;background:#fff;padding:10px 12px;font:inherit;color:#263f37}.group-search-form input:focus{outline:2px solid rgba(11,107,79,.18);border-color:#0b6b4f}@media(max-width:760px){.group-search-form{flex-direction:column}.group-search-form input{font-size:16px;min-height:46px}}body.device-mobile .group-search-form{flex-direction:column}body.device-mobile .group-search-form input{font-size:16px;min-height:46px;padding:11px 12px}


/* v17.2 group management */
.group-card-banner{height:110px;border-radius:18px 18px 0 0;background:linear-gradient(135deg,#123b3c,#1f7a73);background-size:cover;background-position:center;margin:-1px -1px 12px}.group-card-banner.has-image{background-size:cover}.group-hero{min-height:190px;border-radius:22px;position:relative;overflow:hidden;background:linear-gradient(135deg,#0d3436,#217c74);background-size:cover;background-position:center;margin-bottom:12px}.group-hero.fallback:before{content:'FishMap';position:absolute;right:24px;top:20px;font-weight:900;font-size:40px;opacity:.08}.group-hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,15,18,.04),rgba(3,15,18,.82))}.group-hero-title{position:absolute;left:20px;right:20px;bottom:18px;color:#fff}.group-hero-title h3{font-size:28px;margin:0 0 5px}.group-hero-title span{opacity:.86;font-weight:700}.group-action-row,.post-mod-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin:8px 0}.group-description{font-size:15px}.group-rules summary,.settings-card summary{cursor:pointer;font-weight:850}.pinned-label{font-weight:850;font-size:12px;color:var(--brand);margin:6px 0}.pinned-post-wrap{border-radius:18px}.group-invite-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid rgba(128,128,128,.15)}.group-invite-thumb{width:58px;height:44px;border-radius:10px;background:linear-gradient(135deg,#123b3c,#1f7a73);background-size:cover;background-position:center;flex:0 0 auto}.danger{border-color:#b94b4b!important;color:#b94b4b!important}.group-create-form textarea#groupRules{min-height:90px}@media(max-width:700px){.group-hero{min-height:150px;border-radius:18px}.group-hero-title h3{font-size:23px}.group-invite-row{align-items:flex-start;flex-wrap:wrap}.group-invite-row .person-actions{width:100%}.admin-user-row{align-items:flex-start;flex-wrap:wrap}.admin-user-row .person-actions{width:100%;justify-content:flex-start}}


/* v17.2.3 branded topbar icon system */
.topbar-icon{width:21px;height:21px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.topbar-icon-wrap{display:grid;place-items:center;line-height:0}
.icon-btn{display:grid;place-items:center;padding:0}
.icon-btn .topbar-icon{transition:transform .18s ease,stroke-width .18s ease}
.icon-btn:hover .topbar-icon{transform:scale(1.04);stroke-width:2}
.account-header-btn{position:relative}
#accountBtnIcon[data-signed-in="true"] .topbar-icon{stroke:#9af2cf}
.admin-header-btn .topbar-icon{stroke:#b6f3dc}
body.device-mobile .topbar-icon{width:20px;height:20px}

/* v17.2.4 account-gated personal tools */
#accountBtn.signed-out-cta{width:auto;min-width:126px;padding:0 14px;display:flex;align-items:center;justify-content:center;border-color:rgba(74,211,197,.28);background:rgba(20,184,166,.13)}
#accountBtn.signed-out-cta:hover{background:rgba(20,184,166,.22);border-color:rgba(74,211,197,.42)}
.signed-out-account-label{font-size:13px;line-height:1;font-weight:800;letter-spacing:.01em;white-space:nowrap;color:#fff}
body.device-mobile #accountBtn.signed-out-cta{min-width:105px;width:auto;padding:0 10px}
body.device-mobile .signed-out-account-label{font-size:11.5px}

/* FishMap 17.3 public-beta release hardening */
.beta-badge{
  display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border-radius:999px;
  font-size:9px;font-weight:800;letter-spacing:.055em;text-transform:uppercase;
  color:#9af2cf;background:rgba(154,242,207,.10);border:1px solid rgba(154,242,207,.24);
  vertical-align:1px;white-space:nowrap
}
.beta-feedback-btn{
  position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));
  z-index:1150;display:flex;align-items:center;gap:7px;border:1px solid rgba(8,38,53,.16);
  border-radius:999px;background:rgba(255,255,255,.94);color:#082635;padding:9px 13px;
  box-shadow:0 8px 24px rgba(8,38,53,.15);font:700 12px/1 system-ui,-apple-system,sans-serif;
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);cursor:pointer
}
.beta-feedback-btn:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(8,38,53,.20)}
.beta-feedback-dot{width:7px;height:7px;border-radius:50%;background:#14b8a6;box-shadow:0 0 0 3px rgba(20,184,166,.12)}
.deletion-service-status.ready{color:#16765f}
.deletion-service-status.problem{color:#a14a2a}
.trip-map-icon{stroke-width:1.65}
@media(max-width:760px){
  .beta-feedback-btn{padding:9px 11px;bottom:max(10px,env(safe-area-inset-bottom));right:max(10px,env(safe-area-inset-right))}
  .beta-badge{font-size:8px;margin-left:4px}
}

/* v17.3.2 settings control */
#settingsBtn{flex:0 0 auto}
body.device-mobile #settingsBtn{width:38px;height:38px}

/* v17.3.3 settings + theme */
.settings-card-shell{max-width:680px}
.settings-modal-body{padding:16px;overflow:auto;max-height:min(78vh,760px)}
.settings-actions-wrap{display:flex;flex-wrap:wrap;gap:10px}
.settings-list-actions{display:grid;gap:12px}
.settings-list-actions>div{display:grid;grid-template-columns:1fr auto;gap:4px 14px;align-items:center;padding:12px 0;border-bottom:1px solid rgba(8,38,53,.09)}
.settings-list-actions>div:last-child{border-bottom:0}
.settings-list-actions strong,.settings-list-actions small{grid-column:1}
.settings-list-actions button{grid-column:2;grid-row:1/3;align-self:center}
.settings-list-actions small{color:#63757d;line-height:1.35}
.danger-outline-btn{border-color:rgba(172,55,45,.28)!important;color:#9c352f!important}
.settings-danger-card{border-color:rgba(172,55,45,.20)!important}
.settings-status{min-height:24px;margin:8px 2px 2px}
.settings-status.success{color:#15785f}.settings-status.error{color:#a33c34}

html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
@media (prefers-color-scheme:dark){
  html[data-theme="system"]{color-scheme:dark}
  html[data-theme="system"] body{background:#071820;color:#e6f0f2}
  html[data-theme="system"] .filters-panel,
  html[data-theme="system"] .details-sheet,
  html[data-theme="system"] .catch-log-card,
  html[data-theme="system"] .social-card,
  html[data-theme="system"] .settings-card{background:#0b222c;color:#e6f0f2;border-color:#21414d}
  html[data-theme="system"] input,
  html[data-theme="system"] select,
  html[data-theme="system"] textarea{background:#0a1c24;color:#e6f0f2;border-color:#31515c}
  html[data-theme="system"] .panel-tab,
  html[data-theme="system"] .social-tab{color:#c9dade}
  html[data-theme="system"] .favourite-card,
  html[data-theme="system"] .catch-card,
  html[data-theme="system"] .session-card{background:#0d2731;border-color:#244652}
  html[data-theme="system"] .field-help,
  html[data-theme="system"] .settings-list-actions small{color:#9fb3b9}
  html[data-theme="system"] .settings-list-actions>div{border-color:#244652}
  html[data-theme="system"] .beta-feedback-btn{background:rgba(11,34,44,.96);color:#edf7f8;border-color:#31515c}
}
html[data-theme="dark"] body{background:#071820;color:#e6f0f2}
html[data-theme="dark"] .filters-panel,
html[data-theme="dark"] .details-sheet,
html[data-theme="dark"] .catch-log-card,
html[data-theme="dark"] .social-card,
html[data-theme="dark"] .settings-card{background:#0b222c;color:#e6f0f2;border-color:#21414d}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#0a1c24;color:#e6f0f2;border-color:#31515c}
html[data-theme="dark"] .panel-tab,
html[data-theme="dark"] .social-tab{color:#c9dade}
html[data-theme="dark"] .favourite-card,
html[data-theme="dark"] .catch-card,
html[data-theme="dark"] .session-card{background:#0d2731;border-color:#244652}
html[data-theme="dark"] .field-help,
html[data-theme="dark"] .settings-list-actions small{color:#9fb3b9}
html[data-theme="dark"] .settings-list-actions>div{border-color:#244652}
html[data-theme="dark"] .beta-feedback-btn{background:rgba(11,34,44,.96);color:#edf7f8;border-color:#31515c}
html[data-theme="dark"] .secondary-btn{background:#102c37;color:#e9f4f6;border-color:#31515c}
html[data-theme="dark"] .danger-outline-btn{background:#2b1718!important;color:#ffb7ae!important;border-color:#6c3434!important}
html[data-theme="dark"] .settings-danger-card{background:#24191a!important;border-color:#633334!important}
@media(max-width:760px){
  .settings-card-shell{width:min(100%,680px)}
  .settings-modal-body{padding:12px}
  .settings-list-actions>div{grid-template-columns:1fr}
  .settings-list-actions button{grid-column:1;grid-row:auto;justify-self:start;margin-top:6px}
}

/* v17.3.4 beta 5 pre-public-beta accessibility/diagnostics hardening */
.skip-link{position:fixed;left:12px;top:10px;z-index:10000;transform:translateY(-160%);background:#fff;color:#082635;border:2px solid #0b6b4f;border-radius:9px;padding:9px 12px;font-weight:700;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.skip-link:focus{transform:translateY(0)}
.network-status-banner{position:fixed;z-index:9998;left:50%;top:max(8px,env(safe-area-inset-top));transform:translateX(-50%);max-width:min(720px,calc(100vw - 24px));background:#6b4d00;color:#fff;border-radius:10px;padding:8px 12px;font-size:13px;font-weight:650;box-shadow:0 6px 20px rgba(0,0,0,.2);text-align:center}
:where(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid rgba(11,107,79,.38)!important;outline-offset:2px!important}
html[data-theme="dark"] .skip-link{background:#102a2a;color:#effaf5;border-color:#6fd0aa}
html[data-theme="dark"] .network-status-banner{background:#6a4d08;color:#fff7dc}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* v17.3.4 beta 5: public-beta first-run guidance */
.beta-welcome-card{width:min(620px,100%)}
.beta-welcome-copy{margin-top:14px;color:var(--text);line-height:1.6}
.beta-welcome-copy p{margin:10px 0}
.beta-welcome-copy ul{margin:10px 0 10px 20px;padding:0;display:grid;gap:8px}
.beta-welcome-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}
.beta-welcome-actions .primary-btn,.beta-welcome-actions .secondary-btn{width:auto;min-width:120px}
@media (max-width:760px){.beta-welcome-actions{flex-direction:column-reverse}.beta-welcome-actions .primary-btn,.beta-welcome-actions .secondary-btn{width:100%}}

html[data-theme="dark"] .stay-signed-in-row strong{color:#e6f0f2}
html[data-theme="dark"] .stay-signed-in-row small{color:#9fb3b9}
html[data-theme="dark"] .stay-signed-in-row{color:#e6f0f2}
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .stay-signed-in-row strong{color:#e6f0f2}
  html[data-theme="system"] .stay-signed-in-row small{color:#9fb3b9}
  html[data-theme="system"] .stay-signed-in-row{color:#e6f0f2}
}
.compact-accuracy-note{line-height:1.4;padding:10px 12px}


/* v17.3.4 beta 7: collapsible desktop/tablet map sidebar */
@media (min-width:761px){
  .filters-panel{transition:transform .22s ease,box-shadow .22s ease}
  body.sidebar-collapsed .filters-panel{transform:translateX(calc(-100% - 30px));pointer-events:none}
  .sidebar-collapse-btn{
    position:fixed;z-index:1120;left:339px;top:104px;width:36px;height:44px;
    display:grid;place-items:center;padding:0;border:1px solid #d7e3e6;border-left:0;
    border-radius:0 12px 12px 0;background:rgba(250,253,253,.97);color:#31515c;
    box-shadow:6px 8px 20px rgba(8,38,53,.12);cursor:pointer;
    transition:left .22s ease,background .15s ease,color .15s ease;backdrop-filter:blur(14px)
  }
  .sidebar-collapse-btn:hover{background:#fff;color:#08745f}
  .sidebar-collapse-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .22s ease}
  body.sidebar-collapsed .sidebar-collapse-btn{left:0}
  body.sidebar-collapsed .sidebar-collapse-btn svg{transform:rotate(180deg)}
  body.device-tablet .sidebar-collapse-btn{left:313px}
  body.device-tablet.sidebar-collapsed .sidebar-collapse-btn{left:0}
}
@media (max-width:760px){.sidebar-collapse-btn{display:none!important}}
html[data-theme="dark"] .sidebar-collapse-btn{background:rgba(11,34,44,.96);color:#d8e8ec;border-color:#31515c}
@media (prefers-color-scheme:dark){html[data-theme="system"] .sidebar-collapse-btn{background:rgba(11,34,44,.96);color:#d8e8ec;border-color:#31515c}}

/* Beta 8.2: ensure public-beta welcome copy remains readable in dark mode. */
html[data-theme="dark"] .beta-welcome-copy{color:#d8e8ec}
html[data-theme="dark"] .beta-welcome-copy strong{color:#edf7f8}
@media (prefers-color-scheme:dark){
  html[data-theme="system"] .beta-welcome-copy{color:#d8e8ec}
  html[data-theme="system"] .beta-welcome-copy strong{color:#edf7f8}
}

/* Beta 8.3: comprehensive dark-theme surface pass.
   Keep every major FishMap control/card/modal dark instead of inheriting old light-era component colours. */
html[data-theme="dark"]{
  --bg:#071820;--panel:#0b222c;--text:#e6f0f2;--muted:#9fb3b9;--line:#244652;--navy:#edf7f8;--navy-2:#d8e8ec;
}
html[data-theme="dark"] .filters-panel{background:rgba(11,34,44,.97)!important;border-color:#244652!important}
html[data-theme="dark"] .panel-tabs,
html[data-theme="dark"] .segmented,
html[data-theme="dark"] .account-tabs,
html[data-theme="dark"] .social-tabs,
html[data-theme="dark"] .journal-tabs,
html[data-theme="dark"] .location-methods{background:#102c37!important;border-color:#31515c!important}
html[data-theme="dark"] .panel-tab.active,
html[data-theme="dark"] .account-tab.active,
html[data-theme="dark"] .social-tab.active,
html[data-theme="dark"] .journal-tab.active,
html[data-theme="dark"] .location-method.active{background:#183a46!important;color:#edf7f8!important;box-shadow:0 4px 14px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .details-head h2,
html[data-theme="dark"] .favourite-name,
html[data-theme="dark"] .map-layer-copy strong,
html[data-theme="dark"] .weather-temp,
html[data-theme="dark"] .fishability-title{color:#edf7f8!important}
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .favourite-area,
html[data-theme="dark"] .favourite-species,
html[data-theme="dark"] .map-layer-copy small,
html[data-theme="dark"] .map-layer-status,
html[data-theme="dark"] .weather-condition,
html[data-theme="dark"] .weather-metrics,
html[data-theme="dark"] .weather-note,
html[data-theme="dark"] .weather-day-rain,
html[data-theme="dark"] .fishability-context,
html[data-theme="dark"] .fishability-conditions,
html[data-theme="dark"] .fishability-note,
html[data-theme="dark"] .fishability-range-labels{color:#9fb3b9!important}
html[data-theme="dark"] .text-input,
html[data-theme="dark"] .select-input,
html[data-theme="dark"] .catch-field input,
html[data-theme="dark"] .catch-field select,
html[data-theme="dark"] .catch-field textarea,
html[data-theme="dark"] .social-form input,
html[data-theme="dark"] .social-form select,
html[data-theme="dark"] .social-form textarea,
html[data-theme="dark"] .group-search-form input,
html[data-theme="dark"] .comment-form input,
html[data-theme="dark"] .people-search-form input{background:#0a1c24!important;color:#e6f0f2!important;border-color:#31515c!important}
html[data-theme="dark"] .text-input:focus,
html[data-theme="dark"] .select-input:focus{background:#102832!important}
html[data-theme="dark"] .legend-card,
html[data-theme="dark"] .rule-box,
html[data-theme="dark"] .fishability-filter-card,
html[data-theme="dark"] .map-layer-card,
html[data-theme="dark"] .online-water-layer-card,
html[data-theme="dark"] .favourite-empty,
html[data-theme="dark"] .catch-empty,
html[data-theme="dark"] .custom-resolved,
html[data-theme="dark"] .weather-current,
html[data-theme="dark"] .weather-day,
html[data-theme="dark"] .weather-loading,
html[data-theme="dark"] .fishability-card,
html[data-theme="dark"] .fishability-loading,
html[data-theme="dark"] .group-create-form,
html[data-theme="dark"] .avatar-editor,
html[data-theme="dark"] .address-card,
html[data-theme="dark"] .source-btn,
html[data-theme="dark"] .search-suggestions,
html[data-theme="dark"] .search-empty,
html[data-theme="dark"] .planner-result,
html[data-theme="dark"] .planner-intro,
html[data-theme="dark"] .planner-explain,
html[data-theme="dark"] .active-session-card,
html[data-theme="dark"] .session-entry,
html[data-theme="dark"] .social-post,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .group-card,
html[data-theme="dark"] .composer-card,
html[data-theme="dark"] .admin-metric,
html[data-theme="dark"] .admin-user-row,
html[data-theme="dark"] .admin-report-row{background:#0d2731!important;color:#d8e8ec!important;border-color:#244652!important}
html[data-theme="dark"] .fishability-behaviour,
html[data-theme="dark"] .fishability-factor,
html[data-theme="dark"] .profile-visibility-chip,
html[data-theme="dark"] .group-visibility-chip,
html[data-theme="dark"] .role-chip,
html[data-theme="dark"] .status-chip,
html[data-theme="dark"] .tab-count{background:#16343f!important;color:#cfe4e8!important;border-color:#31515c!important}
html[data-theme="dark"] .map-layer-icon,
html[data-theme="dark"] .fish-emoji,
html[data-theme="dark"] .social-avatar,
html[data-theme="dark"] .person-avatar,
html[data-theme="dark"] .comment-avatar{background:#16343f!important;color:#bfe4da!important;border-color:#31515c!important}
html[data-theme="dark"] .sheet-close,
html[data-theme="dark"] .custom-edit,
html[data-theme="dark"] .custom-delete,
html[data-theme="dark"] .catch-delete,
html[data-theme="dark"] .social-mini-btn,
html[data-theme="dark"] .favourite-website{background:#102c37!important;color:#e6f0f2!important;border-color:#31515c!important}
html[data-theme="dark"] .map-layer-toggle{background:#42616a}
html[data-theme="dark"] .map-layer-toggle:checked{background:#0ba68b}
html[data-theme="dark"] .result-pill,
html[data-theme="dark"] .map-legend{background:rgba(11,34,44,.94)!important;color:#edf7f8!important;border-color:#31515c!important}
html[data-theme="dark"] .details-sheet,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .community-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .planner-card,
html[data-theme="dark"] .modal-card{background:#0b222c!important;color:#e6f0f2!important;border-color:#244652!important}
html[data-theme="dark"] .unknown-data-box,
html[data-theme="dark"] .approx-location-note,
html[data-theme="dark"] .weather-error,
html[data-theme="dark"] .fishability-error{background:#322719!important;color:#ffdca2!important;border-color:#66502e!important}
html[data-theme="dark"] .custom-resolved.ready{background:#12352d!important;color:#bcead9!important;border-color:#285b4d!important}
html[data-theme="dark"] .custom-card-badge{background:#34213a!important;color:#efb8fa!important}
html[data-theme="dark"] .profile-avatar,
html[data-theme="dark"] .social-avatar,
html[data-theme="dark"] .comment-avatar{box-shadow:0 0 0 3px #0b222c,0 4px 14px rgba(0,0,0,.28)}
html[data-theme="dark"] .catch-log-header{background:#0b222c!important;border-color:#244652!important}
html[data-theme="dark"] option{background:#0a1c24;color:#e6f0f2}
html[data-theme="dark"] ::placeholder{color:#789098;opacity:1}

@media (prefers-color-scheme:dark){
  html[data-theme="system"]{--bg:#071820;--panel:#0b222c;--text:#e6f0f2;--muted:#9fb3b9;--line:#244652;--navy:#edf7f8;--navy-2:#d8e8ec}
  html[data-theme="system"] .filters-panel{background:rgba(11,34,44,.97)!important;border-color:#244652!important}
  html[data-theme="system"] .panel-tabs,
  html[data-theme="system"] .segmented,
  html[data-theme="system"] .account-tabs,
  html[data-theme="system"] .social-tabs,
  html[data-theme="system"] .journal-tabs,
  html[data-theme="system"] .location-methods{background:#102c37!important;border-color:#31515c!important}
  html[data-theme="system"] .panel-tab.active,
  html[data-theme="system"] .account-tab.active,
  html[data-theme="system"] .social-tab.active,
  html[data-theme="system"] .journal-tab.active,
  html[data-theme="system"] .location-method.active{background:#183a46!important;color:#edf7f8!important;box-shadow:0 4px 14px rgba(0,0,0,.22)!important}
  html[data-theme="system"] .section-title,
  html[data-theme="system"] .details-head h2,
  html[data-theme="system"] .favourite-name,
  html[data-theme="system"] .map-layer-copy strong,
  html[data-theme="system"] .weather-temp,
  html[data-theme="system"] .fishability-title{color:#edf7f8!important}
  html[data-theme="system"] .field-label,
  html[data-theme="system"] .favourite-area,
  html[data-theme="system"] .favourite-species,
  html[data-theme="system"] .map-layer-copy small,
  html[data-theme="system"] .map-layer-status,
  html[data-theme="system"] .weather-condition,
  html[data-theme="system"] .weather-metrics,
  html[data-theme="system"] .weather-note,
  html[data-theme="system"] .weather-day-rain,
  html[data-theme="system"] .fishability-context,
  html[data-theme="system"] .fishability-conditions,
  html[data-theme="system"] .fishability-note,
  html[data-theme="system"] .fishability-range-labels{color:#9fb3b9!important}
  html[data-theme="system"] .text-input,
  html[data-theme="system"] .select-input,
  html[data-theme="system"] .catch-field input,
  html[data-theme="system"] .catch-field select,
  html[data-theme="system"] .catch-field textarea,
  html[data-theme="system"] .social-form input,
  html[data-theme="system"] .social-form select,
  html[data-theme="system"] .social-form textarea,
  html[data-theme="system"] .group-search-form input,
  html[data-theme="system"] .comment-form input,
  html[data-theme="system"] .people-search-form input{background:#0a1c24!important;color:#e6f0f2!important;border-color:#31515c!important}
  html[data-theme="system"] .text-input:focus,
  html[data-theme="system"] .select-input:focus{background:#102832!important}
  html[data-theme="system"] .legend-card,
  html[data-theme="system"] .rule-box,
  html[data-theme="system"] .fishability-filter-card,
  html[data-theme="system"] .map-layer-card,
  html[data-theme="system"] .online-water-layer-card,
  html[data-theme="system"] .favourite-empty,
  html[data-theme="system"] .catch-empty,
  html[data-theme="system"] .custom-resolved,
  html[data-theme="system"] .weather-current,
  html[data-theme="system"] .weather-day,
  html[data-theme="system"] .weather-loading,
  html[data-theme="system"] .fishability-card,
  html[data-theme="system"] .fishability-loading,
  html[data-theme="system"] .group-create-form,
  html[data-theme="system"] .avatar-editor,
  html[data-theme="system"] .address-card,
  html[data-theme="system"] .source-btn,
  html[data-theme="system"] .search-suggestions,
  html[data-theme="system"] .search-empty,
  html[data-theme="system"] .planner-result,
  html[data-theme="system"] .planner-intro,
  html[data-theme="system"] .planner-explain,
  html[data-theme="system"] .active-session-card,
  html[data-theme="system"] .session-entry,
  html[data-theme="system"] .social-post,
  html[data-theme="system"] .person-card,
  html[data-theme="system"] .group-card,
  html[data-theme="system"] .composer-card,
  html[data-theme="system"] .admin-metric,
  html[data-theme="system"] .admin-user-row,
  html[data-theme="system"] .admin-report-row{background:#0d2731!important;color:#d8e8ec!important;border-color:#244652!important}
  html[data-theme="system"] .fishability-behaviour,
  html[data-theme="system"] .fishability-factor,
  html[data-theme="system"] .profile-visibility-chip,
  html[data-theme="system"] .group-visibility-chip,
  html[data-theme="system"] .role-chip,
  html[data-theme="system"] .status-chip,
  html[data-theme="system"] .tab-count{background:#16343f!important;color:#cfe4e8!important;border-color:#31515c!important}
  html[data-theme="system"] .map-layer-icon,
  html[data-theme="system"] .fish-emoji,
  html[data-theme="system"] .social-avatar,
  html[data-theme="system"] .person-avatar,
  html[data-theme="system"] .comment-avatar{background:#16343f!important;color:#bfe4da!important;border-color:#31515c!important}
  html[data-theme="system"] .sheet-close,
  html[data-theme="system"] .custom-edit,
  html[data-theme="system"] .custom-delete,
  html[data-theme="system"] .catch-delete,
  html[data-theme="system"] .social-mini-btn,
  html[data-theme="system"] .favourite-website{background:#102c37!important;color:#e6f0f2!important;border-color:#31515c!important}
  html[data-theme="system"] .map-layer-toggle{background:#42616a}
  html[data-theme="system"] .map-layer-toggle:checked{background:#0ba68b}
  html[data-theme="system"] .result-pill,
  html[data-theme="system"] .map-legend{background:rgba(11,34,44,.94)!important;color:#edf7f8!important;border-color:#31515c!important}
  html[data-theme="system"] .details-sheet,
  html[data-theme="system"] .account-card,
  html[data-theme="system"] .community-card,
  html[data-theme="system"] .admin-card,
  html[data-theme="system"] .planner-card,
  html[data-theme="system"] .modal-card{background:#0b222c!important;color:#e6f0f2!important;border-color:#244652!important}
  html[data-theme="system"] .unknown-data-box,
  html[data-theme="system"] .approx-location-note,
  html[data-theme="system"] .weather-error,
  html[data-theme="system"] .fishability-error{background:#322719!important;color:#ffdca2!important;border-color:#66502e!important}
  html[data-theme="system"] .custom-resolved.ready{background:#12352d!important;color:#bcead9!important;border-color:#285b4d!important}
  html[data-theme="system"] .custom-card-badge{background:#34213a!important;color:#efb8fa!important}
  html[data-theme="system"] .profile-avatar,
  html[data-theme="system"] .social-avatar,
  html[data-theme="system"] .comment-avatar{box-shadow:0 0 0 3px #0b222c,0 4px 14px rgba(0,0,0,.28)}
  html[data-theme="system"] .catch-log-header{background:#0b222c!important;border-color:#244652!important}
  html[data-theme="system"] option{background:#0a1c24;color:#e6f0f2}
  html[data-theme="system"] ::placeholder{color:#789098;opacity:1}
}


/* v17.3.4-beta.8.6 — signed-out feature locks */
.feature-lock-card{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);text-align:left;cursor:pointer;font:inherit}
.feature-lock-card strong{font-size:14px;color:var(--navy)}
.feature-lock-card span{font-size:13px;line-height:1.45;color:var(--muted)}
.feature-lock-card em{font-size:12px;font-style:normal;font-weight:700;color:var(--navy)}
.feature-lock-card:hover{filter:brightness(.98);transform:translateY(-1px)}
html[data-theme="dark"] .feature-lock-card{background:#0b222c;border-color:#244652}
@media (prefers-color-scheme:dark){html[data-theme="system"] .feature-lock-card{background:#0b222c;border-color:#244652}}

/* v17.3.4-beta.8.8 community search layout */
.people-search-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px!important;align-items:stretch;margin-bottom:10px}
.people-search-form input{min-width:0;width:100%;min-height:44px}
.people-search-form .secondary-btn{width:auto!important;min-width:104px;margin-top:0!important;padding-inline:18px}
.group-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:stretch;margin-bottom:10px}
.group-search-form input{min-width:0;width:100%;box-sizing:border-box;border:1px solid #cfded8;border-radius:10px;background:#fff;padding:10px 11px;font:inherit;color:#263f37}
.group-search-form .secondary-btn{width:auto!important;min-width:104px;margin-top:0!important;padding-inline:18px}
@media (max-width:760px){.people-search-form,.group-search-form{grid-template-columns:1fr}.people-search-form .secondary-btn,.group-search-form .secondary-btn{width:100%!important}}
html[data-theme="dark"] .group-search-form input{background:#0a1c24!important;color:#e6f0f2!important;border-color:#31515c!important}
@media (prefers-color-scheme:dark){html[data-theme="system"] .group-search-form input{background:#0a1c24!important;color:#e6f0f2!important;border-color:#31515c!important}}
