/* Hoch Hunt palette. Day = brand olive + tan on warm cream.
   Night = near-black olive with dim tan text (low glare, keeps night vision). */
:root {
  color-scheme: light;
  --brand: #484c33;        /* olive from the logo */
  --brand-tan: #bfab8b;    /* tan from the logo */
  --bg: #484c33;
  --panel: #f6f1e6;
  --panel-2: #ece4d2;
  --text: #2a2d1e;
  --muted: #6b6a55;
  --line: #ddd3bd;
  --accent: #484c33;
  --on-accent: #f3e9d2;
  --accent-soft: #e4dac3;
  --link: #5b6135;
  --bar: #484c33;
  --bar-text: #e3d5b8;
  --bar-muted: #b3a585;
  --fab: #f6f1e6;
  --fab-text: #484c33;
  --map-dim: none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0d08;
  --panel: #15170f;
  --panel-2: #1f2217;
  --text: #cdbf9f;
  --muted: #8a826c;
  --line: #2b2e21;
  --accent: #a8966f;
  --on-accent: #15170f;
  --accent-soft: #292b1e;
  --link: #c2ad82;
  --bar: #101209;
  --bar-text: #b9a882;
  --bar-muted: #7d7560;
  --fab: #1b1d13;
  --fab-text: #b9a882;
  --map-dim: brightness(.68) contrast(1.06) saturate(.85);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0d08;
    --panel: #15170f;
    --panel-2: #1f2217;
    --text: #cdbf9f;
    --muted: #8a826c;
    --line: #2b2e21;
    --accent: #a8966f;
    --on-accent: #15170f;
    --accent-soft: #292b1e;
    --link: #c2ad82;
    --bar: #101209;
    --bar-text: #b9a882;
    --bar-muted: #7d7560;
    --fab: #1b1d13;
    --fab-text: #b9a882;
    --map-dim: brightness(.68) contrast(1.06) saturate(.85);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: fixed; inset: 0; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(34,37,22,.8), rgba(34,37,22,0));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-tan); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.brand-mark { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
#status { font-size: 12px; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

#btnGps { position: fixed; right: 12px; z-index: 1000; bottom: calc(env(safe-area-inset-bottom) + 76px); }
.fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--fab); color: var(--fab-text);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.fab svg { width: 26px; height: 26px; fill: currentColor; }
.fab.active { background: var(--accent); color: var(--on-accent); }
.fab.follow { background: #1a73e8; color: #fff; }

#bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
  display: flex; background: var(--bar); color: var(--bar-text);
  border-top: 1px solid rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
}
#bottombar button {
  flex: 1; border: 0; background: none; color: inherit; font: 600 11px/1.2 inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
}
#bottombar svg { width: 24px; height: 24px; fill: currentColor; }
#bottombar button.open { color: var(--panel); }
:root[data-theme="dark"] #bottombar button.open { color: #e7d7b3; }
#bottombar .rec svg { fill: #e53935; }
#bottombar .rec.on svg { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e53935; color: #fff; }
.hidden { display: none !important; }

#recBanner {
  position: fixed; top: calc(env(safe-area-inset-top) + 40px); left: 50%; transform: translateX(-50%); z-index: 1060;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 999px;
  background: rgba(20,20,20,.85); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
#recBanner button { border: 0; border-radius: 999px; padding: 6px 12px; background: #e53935; color: #fff; font-weight: 700; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: pulse 1.2s infinite; }

.sheet {
  position: fixed; z-index: 1100; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 56px);
  max-height: 62vh; display: flex; flex-direction: column;
  background: var(--panel); color: var(--text);
  border-radius: 16px 16px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform .2s ease;
}
.sheet.hidden { display: none; }
@media (min-width: 760px) {
  .sheet { left: 16px; right: auto; width: 400px; bottom: 72px; border-radius: 14px; max-height: 75vh; }
}
.sheet-head {
  background: var(--panel-2); border-radius: 16px 16px 0 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.sheet-body { padding: 8px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.close { border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }

.group-label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 14px 0 6px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 10px 6px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.row input { width: 20px; height: 20px; accent-color: var(--accent); }
.row small { color: var(--muted); }
.sw { width: 18px; height: 18px; border-radius: 4px; background: var(--c); flex: none; }
.sw.hatch { background: repeating-linear-gradient(45deg, var(--c) 0 2px, transparent 2px 5px); border: 1.5px solid var(--c); }
.sw.outline { background: transparent; border: 2px solid var(--c); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.card h3 { margin: 0 0 6px; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag { white-space: nowrap; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--c, #666); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 3px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.kv a, .coords a, .note a { color: var(--link); font-weight: 600; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.actions a { flex: 1; min-width: 110px; text-align: center; padding: 10px; border-radius: 10px;
  background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 600; }
.muted { color: var(--muted); }
.coords { font-size: 12px; color: var(--muted); margin-top: 4px; }

.leaflet-control-attribution { font-size: 10px; }
/* Night: dim the basemap (not the pins or labels). */
.leaflet-tile-pane { filter: var(--map-dim); }
:root[data-theme="dark"] .leaflet-control-attribution, :root[data-theme="dark"] .leaflet-control-scale-line { opacity: .55; }
.leaflet-container { background: var(--bg); }
.gps-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(26,115,232,.4), 0 1px 4px rgba(0,0,0,.4); }

.sw.road { background: linear-gradient(#0000 38%, #e8a27c 38% 62%, #0000 62%), linear-gradient(90deg, #0000 40%, #cdb892 40% 60%, #0000 60%); }
.sw.town-sw { background: radial-gradient(circle, #fff 28%, #222 30% 44%, #0000 46%); }
.town { display: flex; align-items: center; gap: 4px; white-space: nowrap; transform: translate(-4px, -50%); }
.town .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; border: 1.5px solid #222; flex: none; }
.town .nm { color: #fff; font: 600 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 3px #000; }
.town.big .nm { font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.town.big .dot { width: 9px; height: 9px; }

.leaflet-top.leaflet-left { top: calc(env(safe-area-inset-top) + 36px); }
.actions a.primary { background: var(--accent); color: var(--on-accent); }
.actions a.disabled { opacity: .45; pointer-events: none; }
.actions.small a { padding: 7px; min-width: 0; font-size: 13px; }
.small { font-size: 12px; }
.item { padding: 10px 12px; }
.item-head { display: flex; gap: 10px; align-items: flex-start; }
.item-main { flex: 1; min-width: 0; }
.vis input { width: 20px; height: 20px; accent-color: #ff3da8; margin-top: 2px; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
#dlBar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---- Waypoints ---- */
#map { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wp-marker { background: none; border: 0; }
.wp-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5);
  display: grid; place-items: center;
}
.wp-pin > span { transform: rotate(45deg); display: grid; place-items: center; }
.wp-label {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap; display: none;
  color: #fff; font: 600 12px/1.1 system-ui, sans-serif; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 3px #000;
}
.wp-labels .wp-label { display: block; }
.wp-moving .leaflet-marker-draggable .wp-pin { outline: 3px dashed #fff; outline-offset: 3px; }
.wp-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; flex: none; border: 2px solid rgba(255,255,255,.8); }
.wp-dot.big { width: 46px; height: 46px; }
.wp-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.wp-head input, #wpNotes {
  flex: 1; width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
}
#wpNotes { resize: vertical; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; }
.swatch.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.icon-btn { border: 1px solid transparent; background: none; color: var(--text); border-radius: 10px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; }
.icon-btn > span { width: 40px; height: 40px; border-radius: 50%; background: var(--c); display: grid; place-items: center; }
.icon-btn small { font-size: 11px; line-height: 1.15; text-align: center; color: var(--muted); }
.icon-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.on small { color: var(--text); font-weight: 600; }
.wp-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: pointer; }
.wp-row .item-main { display: flex; flex-direction: column; }

/* Inputs follow the theme */
.wp-head input, #wpNotes { background: var(--panel); }
input::placeholder, textarea::placeholder { color: var(--muted); }
@media (min-width: 760px) { .sheet-head { border-radius: 14px 14px 0 0; } }

/* ---- Hunting units ---- */
.sw.outline.dashed { border-style: dashed; }
.seg.sub { margin: 2px 0 8px 30px; }
.seg.sub button { padding: 7px 4px; font-size: 13px; }
.seg.sub.off { opacity: .45; pointer-events: none; }
.unit-chip-wrap { background: none; border: 0; }
.unit-chip {
  display: inline-block; transform: translate(-50%, -50%); white-space: nowrap;
  padding: 2px 7px; border-radius: 6px; border: 2px solid var(--c);
  background: rgba(16,18,9,.78); color: #fff; font: 700 12px/1.2 system-ui, sans-serif; letter-spacing: .3px;
}
.unit-list { margin: 0; padding: 0; list-style: none; }
.unit-list li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.unit-list i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; transform: translateY(1px); }

/* ---- Fishing ---- */
.ramp { width: 22px; height: 22px; border-radius: 50%; background: #1d5fbf; border: 2px solid #fff;
  display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ramp svg { width: 13px; height: 13px; fill: #fff; }
.depth-big { font-size: 22px; font-weight: 800; color: #1d5fbf; }
:root[data-theme="dark"] .depth-big { color: #6fb0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .depth-big { color: #6fb0ff; } }
.fish-status { font-size: 13px; margin: 6px 0 0; }

/* ---- Search ---- */
#btnSearch {
  margin-left: auto; pointer-events: auto; display: flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 7px 14px 7px 10px; cursor: pointer;
  background: var(--fab); color: var(--fab-text); font: 600 14px/1 inherit; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
#btnSearch svg { width: 18px; height: 18px; fill: currentColor; }
#searchPanel { top: calc(env(safe-area-inset-top) + 52px); bottom: auto; max-height: 72vh; border-radius: 16px; margin: 0 8px; }
#searchPanel .sheet-head { border-radius: 16px 16px 0 0; gap: 8px; }
@media (min-width: 760px) { #searchPanel { left: auto; right: 16px; margin: 0; width: 420px; } }
#searchInput {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.search-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: pointer; }
.search-row .item-main { display: flex; flex-direction: column; }
.search-row:hover, .search-row:focus-visible { background: var(--panel-2); }
.search-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--accent)); display: grid; place-items: center; flex: none; }
.search-ico svg { width: 17px; height: 17px; fill: #fff; }

/* ---- Species & regulations ---- */
.sheet.tall { max-height: 82vh; }
@media (min-width: 760px) { .sheet.tall { width: 520px; max-height: 84vh; } }
.sp-banner { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 2px; }
.sp-banner span { font-size: 12px; color: var(--muted); }
#spFilter { width: 100%; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; border: 1px solid var(--line); background: none; color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sp-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 2px; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: pointer; }
.sp-row .item-main { display: flex; flex-direction: column; gap: 2px; }
.sp-row .chev { color: var(--muted); font-size: 22px; }
.sp-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--c); display: grid; place-items: center; flex: none; }
.sp-ico.big { width: 48px; height: 48px; }
.sp-status { font-size: 12px; font-weight: 600; }
.sp-status.open { color: #2e8b3a; }
.sp-status.soon { color: #b07a00; }
.sp-status.closed { color: var(--muted); font-weight: 500; }
:root[data-theme="dark"] .sp-status.open { color: #7fcf86; }
:root[data-theme="dark"] .sp-status.soon { color: #e0b64f; }
.sp-back { border: 0; background: none; color: var(--link); font: 600 14px/1 inherit; padding: 6px 0 10px; cursor: pointer; }
.sp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.sp-head h3 { margin: 0; font-size: 19px; }
#speciesBody h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.sp-season { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-dates { text-align: right; white-space: nowrap; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.sp-list { margin: 0; padding-left: 18px; font-size: 14px; }
.sp-list li { margin: 3px 0; }
.sp-warn { background: #fff3cd; color: #5c4400; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.sp-closed { background: var(--panel-2); border-radius: 10px; padding: 12px; font-weight: 700; margin: 8px 0; }
.sp-proc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.sp-proc-title { font-weight: 700; margin-bottom: 4px; }
#speciesBody details { border-top: 1px solid var(--line); padding: 6px 0; }
#speciesBody summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.sp-official { font-size: 13px; line-height: 1.45; overflow-x: auto; }
.sp-official table { border-collapse: collapse; margin: 6px 0; font-size: 12px; min-width: 100%; }
.sp-official td, .sp-official th { border: 1px solid var(--line); padding: 4px 6px; vertical-align: top; }
.sp-official p { margin: 6px 0; }
#bottombar button { min-width: 0; }
#bottombar span { font-size: 10.5px; }

/* ---- Ask Hoch Hunt (AI) & reports ---- */
.topbtn { pointer-events: auto; display: flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 7px 12px 7px 9px;
  cursor: pointer; background: var(--brand-tan); color: #2a2d1e; font: 700 14px/1 inherit; box-shadow: 0 2px 8px rgba(0,0,0,.35); margin-left: auto; }
.topbtn svg { width: 17px; height: 17px; fill: currentColor; }
#btnAsk + #btnSearch { margin-left: 8px; }
.ask-tabs { flex: 1; margin-right: 10px; }
#aiLog { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.ai-msg { padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; max-width: 92%; word-wrap: break-word; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.ai-msg.assistant ul, .ai-msg.assistant ol { margin: 4px 0; padding-left: 20px; }
.ai-msg.assistant a { color: var(--link); font-weight: 600; }
.ai-msg.status { align-self: flex-start; color: var(--muted); font-style: italic; background: none; padding-left: 2px; }
.ai-msg.status span::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.ai-cost { font-size: 11px; color: var(--muted); margin-top: 6px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
#aiForm { display: flex; gap: 8px; margin-top: 8px; }
#aiInput, #aiKey { flex: 1; width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
#aiForm button { border: 0; border-radius: 10px; padding: 0 16px; background: var(--accent); color: var(--on-accent); font-size: 18px; cursor: pointer; }
.ai-pin { width: 26px; height: 26px; border-radius: 50%; background: #e53935; color: #fff; border: 2px solid #fff; display: grid; place-items: center;
  font: 800 13px/1 system-ui, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.rp-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rp-meta { font-size: 12px; color: var(--muted); }
.rp-src { font-weight: 700; color: var(--text); }
.rp-src.fishing { color: #1d6fb8; } .rp-src.hunting { color: #8d5a2b; } .rp-src.news { color: #2e7d32; }
:root[data-theme="dark"] .rp-src.fishing { color: #6fb0ff; } :root[data-theme="dark"] .rp-src.hunting { color: #d9a46b; } :root[data-theme="dark"] .rp-src.news { color: #7fcf86; }
.rp-title { display: block; font-weight: 700; color: var(--text); text-decoration: none; margin: 2px 0; }
.rp-ex { font-size: 13px; color: var(--muted); }
.rp-places { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.rp-places span { font-size: 11px; background: var(--panel-2); border-radius: 999px; padding: 2px 8px; }
.rp-book { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--link); }
.lake-reports { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.lake-reports b { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.lake-reports a { display: block; font-size: 13px; color: var(--link); margin: 4px 0; }

/* ---- Weather ---- */
#radarBar { position: fixed; left: 12px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 1000; display: flex; align-items: center; gap: 8px;
  background: rgba(16,18,9,.82); color: #fff; border-radius: 999px; padding: 5px 12px 5px 5px; font: 600 13px/1 system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#radarPlay { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--brand-tan); color: #2a2d1e; font-size: 13px; cursor: pointer; }
table.wx { width: 100%; border-collapse: collapse; font-size: 13px; }
table.wx td, table.wx th { padding: 3px 4px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.wx td:last-child { white-space: normal; color: var(--muted); }
table.wx th { color: var(--muted); font-weight: 600; font-size: 11px; }

/* Keep the title on one line; status text truncates instead */
.brand { white-space: nowrap; flex: none; }
#status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Sun & shooting hours ---- */
#sunPill { position: fixed; right: 12px; top: calc(env(safe-area-inset-top) + 50px); z-index: 1000; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 6px 11px; border-radius: 12px;
  background: rgba(16,18,9,.8); color: #fff; font: 600 12.5px/1.25 system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#sunPill .sun-a { font-weight: 700; }
#sunPill .sun-b { font-size: 11.5px; color: #d9cdb3; }
#sunPill .sun-b.open { color: #9be39f; }
#sunPill.open { box-shadow: 0 0 0 2px rgba(120,210,125,.6), 0 2px 8px rgba(0,0,0,.4); }
.sun-seg button { font-size: 13px; padding: 9px 4px; }

/* ---- Zoom buttons & ruler ---- */
#mapTools { position: fixed; right: 16px; z-index: 1000; bottom: calc(env(safe-area-inset-bottom) + 140px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fab.sm { width: 44px; height: 44px; }
.fab.sm svg { width: 22px; height: 22px; }
.zoom-pair { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.zoom-pair button { width: 44px; height: 44px; border: 0; background: var(--fab); color: var(--fab-text); cursor: pointer;
  font: 500 26px/1 system-ui, sans-serif; display: grid; place-items: center; }
.zoom-pair button + button { border-top: 1px solid rgba(0,0,0,.15); }
.zoom-pair button:disabled { opacity: .45; }
#measureBar { position: fixed; left: 12px; right: 76px; z-index: 1001; bottom: calc(env(safe-area-inset-bottom) + 76px);
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-radius: 14px;
  background: rgba(16,18,9,.88); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
#measureBar .ms-read { flex: 1; min-width: 0; }
#msTotal { font: 700 17px/1.2 system-ui, sans-serif; color: #ffd23f; }
#msSub { font-size: 11.5px; color: #d9cdb3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#measureBar button { border: 0; border-radius: 9px; padding: 8px 10px; font: 600 12.5px system-ui, sans-serif;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
#measureBar button.primary { background: #ffd23f; color: #1b1d13; }
#measureBar button:disabled { opacity: .4; }
.ms-pt { background: #ffd23f; border: 2px solid #1b1d13; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.leaflet-tooltip.ms-tip { background: rgba(16,18,9,.85); color: #ffd23f; border: 0; font-weight: 700; padding: 2px 6px; box-shadow: none; }
.leaflet-tooltip.ms-tip::before { display: none; }
#map.measuring { cursor: crosshair; }

/* ---- Partner booking ---- */
.rp-partner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 12px 14px;
  border-radius: 12px; background: var(--accent); color: var(--on-accent); text-decoration: none; }
.rp-partner > span:first-child { display: flex; flex-direction: column; }
.rp-partner-btn, a.rp-book-btn { background: #bfab8b; color: #1b1d13; font-weight: 800; border-radius: 9px; padding: 8px 12px; white-space: nowrap; text-decoration: none; }
a.rp-book-btn { display: block; text-align: center; margin-top: 8px; }

/* ---- Private preview builds ---- */
#edBadge { position: fixed; left: 50px; top: calc(env(safe-area-inset-top) + 36px); z-index: 1001; pointer-events: none;
  font: 700 10.5px/1 system-ui, sans-serif; letter-spacing: .4px; text-transform: uppercase; color: #1b1d13;
  background: #bfab8b; padding: 3px 7px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
#edMark { position: fixed; inset: -50%; z-index: 999; pointer-events: none; transform: rotate(-28deg); overflow: hidden;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 110px 70px; padding: 40px;
  font: 700 17px/1 system-ui, sans-serif; color: rgba(255,255,255,.13); text-shadow: 0 0 2px rgba(0,0,0,.18); white-space: nowrap; }
#edWelcome, #edExpired { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 24px;
  background: rgba(16,18,9,.75); }
#edExpired { background: #222516; color: #e9dcc3; text-align: center; align-content: center; }
#edExpired img, .ed-card img { width: 72px; }
.ed-card { max-width: 340px; background: var(--panel, #f6f1e6); color: var(--text); border-radius: 16px; padding: 22px; text-align: center; }
.ed-card h3 { margin: 8px 0; }
.ed-card button { margin-top: 10px; border: 0; border-radius: 10px; padding: 11px 26px; font: 700 15px system-ui, sans-serif;
  background: var(--accent); color: var(--on-accent); cursor: pointer; }

/* ---- Saved: pins list ---- */
.saved-tabs { flex: 1; margin-right: 8px; }
#plSearch { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.pl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pl-filters select { flex: 1 1 30%; min-width: 0; font: inherit; font-size: 14px; padding: 7px 6px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.pl-colors { gap: 8px; margin: 6px 0; }
.swatch.sm { width: 26px; height: 26px; }
.pl-head, #plSelBar { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; min-height: 30px; }
#plSelBar { padding: 6px 8px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; font-weight: 600; }
.linkish { border: 0; background: none; padding: 4px 2px; color: var(--link); font: 600 14px system-ui, sans-serif; cursor: pointer; }
#plSelBar button:not(.linkish) { border: 0; border-radius: 8px; padding: 7px 12px; font: 700 13.5px system-ui, sans-serif; cursor: pointer;
  background: var(--accent); color: var(--on-accent); }
#plSelBar button.danger { background: #c62828; color: #fff; }
#plSelBar button:disabled { opacity: .4; cursor: default; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pl-row.on { background: var(--accent-soft); }
.pl-row .item-main { display: flex; flex-direction: column; }
.pl-check { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pl-notes { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Tagline ---- */
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-tag { font-size: 8.5px; font-weight: 700; letter-spacing: 2.4px; opacity: .92; margin-top: 1px; }
#edBadge { top: calc(env(safe-area-inset-top) + 44px); }
.ed-tag { font: 700 11px/1 system-ui, sans-serif; letter-spacing: 2.6px; text-transform: uppercase; color: #bfab8b; margin-top: 6px; }

/* ---- Friends ---- */
#bottombar button { position: relative; }
.fr-count { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #e53935; color: #fff; font: 700 11px/17px system-ui, sans-serif; text-align: center; }
.fr-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fr-form input, .fr-add input, .fr-box select { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.fr-form button, .fr-add button, .fr-btn { border: 0; border-radius: 10px; padding: 11px 16px; font: 700 15px system-ui, sans-serif;
  background: var(--accent); color: var(--on-accent); cursor: pointer; }
.fr-btn { padding: 7px 12px; font-size: 13.5px; }
.fr-form button:disabled, .fr-add button:disabled { opacity: .5; }
.fr-msg { min-height: 1.2em; margin: 6px 0; color: var(--link); font-weight: 600; font-size: 14px; }
.fr-auth-tabs { margin-top: 8px; }
.fr-me, .fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.fr-row { border-bottom: 1px solid var(--line); cursor: pointer; }
.fr-row.pending { opacity: .75; cursor: default; }
.fr-me .item-main, .fr-row .item-main { display: flex; flex-direction: column; }
.fr-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 800 13px system-ui, sans-serif; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.fr-live { color: #2e9d4a; font-weight: 700; }
.fr-box { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 6px; }
.fr-toggle { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.fr-toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.fr-add { display: flex; gap: 8px; margin-top: 12px; }
.fr-add input { flex: 1; min-width: 0; }
.fr-pick { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.fr-pick input { width: 20px; height: 20px; accent-color: var(--accent); }
.fr-marker { overflow: visible; }
.fr-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 800 13px system-ui, sans-serif; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.45); box-sizing: border-box; }
.fr-dot.stale { filter: grayscale(.8); opacity: .8; }
.fr-label { position: absolute; left: 50%; top: 38px; transform: translateX(-50%); white-space: nowrap; font: 700 11.5px system-ui, sans-serif;
  color: #fff; background: rgba(16,18,9,.78); padding: 2px 6px; border-radius: 6px; }
.fr-badge { position: absolute; right: -6px; top: -6px; width: 17px; height: 17px; border-radius: 50%; background: var(--c); color: #fff;
  border: 2px solid #fff; font: 800 8px/13px system-ui, sans-serif; text-align: center; transform: rotate(45deg); }
.fr-card p { margin: 6px 0; }
.fr-card .wp-dot { vertical-align: middle; }

/* ---- Community reports, profiles, awards ---- */
.fr-av, .fr-dot, .pf-av { overflow: hidden; }
.fr-av img, .fr-dot img, .pf-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-me { cursor: pointer; }
.cm-box { margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm-post { padding: 10px 0; border-top: 1px solid var(--line); }
.cm-post:first-of-type { border-top: 0; }
.cm-by { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cm-by > span:last-child { display: flex; flex-direction: column; }
.cm-by .fr-av { width: 32px; height: 32px; font-size: 12px; }
.cm-level { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; background: var(--brand-tan); color: #1b1d13; padding: 1px 6px; border-radius: 5px; margin-left: 4px; }
.cm-meta { margin: 6px 0 2px; font-size: 13.5px; }
.cm-kind { font-weight: 700; }
.cm-kind.fishing { color: #1e6fd0; } .cm-kind.hunting { color: #c0571b; } .cm-kind.scouting { color: #3d8b3d; } .cm-kind.conditions { color: #7a5aa6; }
.cm-stars { color: #e0a800; letter-spacing: 1px; }
.cm-text { white-space: pre-wrap; margin: 4px 0; }
.cm-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.cm-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.cm-actions { display: flex; gap: 14px; }
.cm-actions .linkish { font-size: 13px; }
.cm-actions .linkish:disabled { opacity: .5; cursor: default; }
.cm-compose select, .cm-compose input, .cm-compose textarea { font: inherit; font-size: 16px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); width: 100%; }
.cm-row2 { display: flex; gap: 8px; } .cm-row2 > * { flex: 1; min-width: 0; }
.cm-rate { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
#cmStars button { border: 0; background: none; font-size: 26px; line-height: 1; color: #c9c2b0; cursor: pointer; padding: 0 2px; }
#cmStars button.on { color: #e0a800; }
.cm-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.cm-ph { position: relative; }
.cm-ph img { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; }
.cm-ph button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #c62828; color: #fff; font-weight: 800; cursor: pointer; }
.cm-addph { width: 78px; height: 78px; border-radius: 10px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; color: var(--muted); }
.cm-addph span { font-size: 11px; }
.cm-postbtn { width: 100%; border: 0; border-radius: 12px; padding: 13px; font: 800 16px system-ui, sans-serif; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.cm-postbtn:disabled { opacity: .5; }
#cmToast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 4000;
  background: #222516; color: #ffd23f; padding: 10px 16px; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.45);
  display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 15px; max-width: 90vw; }
#cmToast span { color: #e9dcc3; font-size: 13px; margin-top: 2px; }
#cmViewer { position: fixed; inset: 0; z-index: 4500; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#cmViewer img { max-width: 100%; max-height: 88vh; object-fit: contain; }
.cm-vcap { color: #ddd; margin-top: 8px; font-size: 14px; }
.cm-feed { margin-bottom: 14px; }
.cm-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.cm-top button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 16px; padding: 5px 10px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.pf-head { display: flex; align-items: center; gap: 14px; }
.pf-photo { position: relative; flex: none; }
.pf-photo.mine { cursor: pointer; }
.pf-av { width: 84px; height: 84px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 800 28px system-ui, sans-serif; }
.pf-edit { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); padding: 2px 6px; border-radius: 6px; }
.pf-name { font-size: 20px; font-weight: 800; }
.pf-level { margin-top: 4px; font-weight: 800; color: var(--link); }
.pf-bar { height: 8px; border-radius: 4px; background: var(--line); margin: 12px 0 4px; overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: linear-gradient(90deg, #bfab8b, #e0a800); }
.pf-stats { display: flex; justify-content: space-between; margin: 12px 0; text-align: center; }
.pf-stats span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.pf-stats b { font-size: 18px; color: var(--text); }
.pf-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-badge { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); opacity: .38; filter: grayscale(1); }
.pf-badge.on { opacity: 1; filter: none; background: var(--accent-soft); border-color: var(--brand-tan); }
.pf-badge span { font-size: 24px; }
.pf-badge b { font-size: 11.5px; line-height: 1.15; margin-top: 2px; }
.pf-badge small { font-size: 10px; color: var(--muted); line-height: 1.15; margin-top: 2px; }

/* ---- Lost & found ---- */
.cm-tabs { margin-bottom: 8px; }
.cm-tabs button { padding: 8px 4px; font-size: 14px; }
.cm-head .cm-count { flex: 1; }
.lf-tag { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; color: #fff; }
.lf-tag.found { background: #2e8b3d; } .lf-tag.lost { background: #c62828; } .lf-tag.done { background: #8a8a80; }
.lf-replies { margin: 8px 0 0 10px; padding-left: 10px; border-left: 3px solid var(--brand-tan); }
.lf-reply { padding: 6px 0; }
.pf-stats span { min-width: 0; }

/* ---- Founder ---- */
.fr-founder { color: #b8860b; font-weight: 700; }
.cm-level.founder { background: #e0a800; }

/* ---- Preview welcome tour ---- */
#edWelcome .ed-card { max-height: 86vh; overflow-y: auto; text-align: left; }
#edWelcome .ed-card > img, #edWelcome .ed-card > .ed-tag, #edWelcome .ed-card > h3 { display: block; margin-left: auto; margin-right: auto; text-align: center; }
#edWelcome .ed-card > button { display: block; margin: 12px auto 0; }
.ed-feats { margin: 8px 0; padding-left: 18px; font-size: 13.5px; line-height: 1.35; }
.ed-feats li { margin: 5px 0; }

/* ---- Web Lite ---- */
#liteBadge { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 70px); z-index: 1001;
  background: rgba(16,18,9,.85); color: #e9dcc3; font: 600 12px system-ui, sans-serif; padding: 6px 12px; border-radius: 16px; white-space: nowrap; }
#liteBadge a { color: #e0752d; text-decoration: none; font-weight: 800; }
.lite-locked { position: relative; }
#bottombar .lite-locked::after, .topbtn.lite-locked::after, #btnSearch.lite-locked::after { content: "🔒"; position: absolute; top: 2px; right: calc(50% - 20px); font-size: 10px; }
.topbtn.lite-locked::after, #btnSearch.lite-locked::after { top: -4px; right: -4px; }
#layerPanel label.lite-locked { opacity: .75; }
#layerPanel label.lite-locked::after { content: "🔒"; margin-left: auto; font-size: 12px; }
#liteGate { position: fixed; inset: 0; z-index: 5000; background: rgba(16,18,9,.7); display: grid; place-items: center; padding: 24px; }
.lite-card { max-width: 340px; background: var(--panel); color: var(--text); border-radius: 18px; padding: 24px; text-align: center; }
.lite-shot { margin: 10px auto 4px; width: 150px; height: 230px; border-radius: 16px; overflow: hidden; border: 3px solid #1b1d13; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.lite-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lite-lock { display: inline-block; margin-top: 6px; font: 800 10.5px system-ui, sans-serif; letter-spacing: 2px; color: #fff; background: #e0752d; padding: 2px 8px; border-radius: 6px; }
.lite-card h3 { margin: 10px 0 6px; } .lite-card p { margin: 0 0 16px; color: var(--muted); }
.lite-go { display: block; background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; padding: 12px; border-radius: 12px; }
#liteClose { margin-top: 8px; border: 0; background: none; color: var(--link); font: 600 14px system-ui, sans-serif; cursor: pointer; }
