:root {
  /* One dark theme: navy cards floating on a near-black background, bright blue for actions. */
  color-scheme: dark;
  --bg: #1d1e21;
  --surface: #18233a;
  --surface-2: #22334f;
  --text: #f3f5f9;
  --muted: #a7b2c3;
  --line: #2b3d5a;
  --brand: #18233a;
  --accent: #5aa2f7;
  --accent-ink: #ffffff;
  --accent-soft: #233a5c;
  --sun: #f5a524;
  --good: #3fcf8e;
  --danger: #ff6b6b;
  --radius: 22px;
  --shadow: none;
  --nav-bg: rgba(24, 35, 58, .94);
  --field: #111a2c;
}

/* Light theme, for reading in bright sun: white cards, near-black text, deeper blue. */
:root[data-theme="light"] {
  /* Light: a pale aqua-blue page, see-through white cards floating on it,
     deep navy text and bright blue icons. */
  /* "only": browsers with their own dark mode (Samsung Internet) mustn't darken it. */
  color-scheme: only light;
  --bg: #f3f8fc;
  --surface: rgba(255, 255, 255, .62);
  --surface-2: rgba(226, 238, 252, .9);
  --text: #1a242e;
  --muted: #4e5f73;
  --line: #e3eaef;
  --brand: #f3f8fc;
  --accent: #2f7cf6;
  --accent-ink: #ffffff;
  --accent-soft: #e2eefc;
  --good: #11804f;
  --danger: #c62828;
  --nav-bg: rgba(246, 248, 250, .97);
  --field: #ffffff;
  --shadow: 0 1px 2px rgba(30, 70, 110, .04), 0 6px 18px rgba(30, 70, 110, .06);
}
:root[data-theme="light"] body {
  background: linear-gradient(180deg, #f3f8fc 0%, #eaf5f9 45%, #e5f2f8 100%) fixed;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="light"] .mi-icon { color: #4e99ff; }
:root[data-theme="light"] h1, :root[data-theme="light"] .menu-item b { font-weight: 700; }
/* Menus that open over the page stay solid. */
:root[data-theme="light"] .theme-menu { background: #ffffff; }
:root[data-theme="light"] .bars { --zero-line: #9fb0c6; }

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 12px 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* Solid, not blurred: a blur here would pin the phone tab bar (inside it) to the header. */
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
}
.brand { color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
#nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
#nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
}
#nav a.active, #nav a:hover { background: var(--surface-2); }
#nav a.cta { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

@media (max-width: 640px) {
  #nav a { padding: 6px 8px; font-size: 14px; }
}

main { max-width: 860px; margin: 0 auto; padding: 20px 16px; }

h1 { font-size: 1.6rem; margin: 8px 0 16px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pad { padding: 16px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { flex: 1 1 160px; }

.feed { display: grid; gap: 16px; }
.catch-photo { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--line); }
/* Photos keep their own shape, landscape or portrait; only very tall ones are trimmed. */
/* The whole photo always shows: a tall (portrait) one fits within the height,
   with a neutral band either side on wide screens, instead of being cropped. */
img.catch-photo { display: block; aspect-ratio: auto; height: auto; max-height: min(80vh, 680px); object-fit: contain; background: var(--surface-2); }
.catch-photo.placeholder {
  display: grid;
  place-items: center;
  font-size: 64px;
  background: linear-gradient(160deg, #2a5a9a, #18233a);
}
.catch-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.catch-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.catch-title a { color: inherit; text-decoration: none; }
.weight { font-weight: 700; font-size: 1.1rem; color: var(--accent); white-space: nowrap; }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
}
.badge.release { background: rgba(63, 207, 142, .15); color: var(--good); }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

button, .btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
button:hover, .btn:hover { filter: brightness(1.1); }
button.danger { color: var(--danger); background: rgba(255, 107, 107, .12); }
button.liked { border-color: var(--danger); color: var(--danger); }
button:disabled { opacity: .6; cursor: default; }

form.stack { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Fields never push a form wider than the screen (fieldsets and selects otherwise
   grow to their longest content). */
fieldset { min-width: 0; }
select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: 20px; height: 20px; }
textarea { min-height: 90px; resize: vertical; }
.error { color: var(--danger); font-weight: 600; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stat { text-align: center; padding: 12px; }
.stat b { display: block; font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
}
.hero h1 { margin: 0 0 6px; }
.hero p { margin: 0 0 14px; color: var(--muted); }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  max-width: calc(100% - 32px);
}

.btn.ghost-light { background: transparent; border-color: var(--line); color: var(--text); }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.how h3 { margin: 0 0 4px; font-size: 1rem; }
.how p { margin: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.two h2 { margin: 0; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.banner > div { flex: 1 1 240px; }
.invite { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.code { font: 700 1.6rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .18em; }
.code-input { text-transform: uppercase; letter-spacing: .15em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.member { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.member .actions { margin-top: 0; }
.member button { padding: 4px 10px; font-size: 14px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
button.more { margin: 16px auto; display: block; }
button.more[hidden] { display: none; }

/* ---- navigation: top bar on wide screens, tab bar at the bottom on phones ---- */
:root { --green: #2fbf71; --blue: #4aa3ff; }
#nav a { display: inline-flex; align-items: center; gap: 6px; }
#nav svg { width: 18px; height: 18px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nav a[aria-current="page"] { background: var(--surface-2); color: var(--accent); }

@media (max-width: 640px) {
  /* No floating bar on phones (the menu is at the bottom): the logo stays pinned
     at the top on the page's own colour. (No transforms or blur here: they
     would trap the fixed tab bar.) */
  .topbar {
    position: sticky; top: 0; z-index: 15; justify-content: center; margin: 0; padding: 10px 0 8px;
    background: var(--bg); border: 0; border-radius: 0; box-shadow: none;
  }
  .brand .mark { width: 30px; height: 30px; }

  /* The tab bar floats above the page, clear of the screen edges. */
  #nav {
    position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
    padding: 8px;
    background: var(--nav-bg); backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  }
  #nav a { flex-direction: column; gap: 3px; padding: 8px 2px; font-size: 11px; text-align: center; border-radius: 20px; }
  #nav svg { width: 22px; height: 22px; }
  #nav a.cta { background: var(--accent); color: var(--accent-ink); }
  main { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
  #toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- participants ---- */
.center { text-align: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 12px; }
.seg a { text-align: center; padding: 10px; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--muted); }
.seg a[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; font-weight: 400; }
.search span { font-size: 22px; color: var(--muted); }
.search input { border: 0; padding: 12px 0; background: transparent; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: start; }
.pcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.pcard[hidden] { display: none; }
.pcard img, .pcard .ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pcard .ph { display: grid; place-items: center; font-size: 48px; background: linear-gradient(160deg, #2a5a9a, #18233a); }
.pbody { padding: 10px 12px 12px; }
.pname { font-weight: 800; font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
.psub { color: var(--muted); font-size: 14px; margin-bottom: 4px; overflow-wrap: anywhere; }
.tally { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-top: 6px; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; border-radius: inherit; }
.bar.green i { background: var(--green); }
.bar.blue i { background: var(--blue); }
@media (min-width: 641px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-top: 8px; }

/* ---- records ---- */
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.record { display: grid; gap: 6px; align-content: start; }
.record-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.wr-lb { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ours { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; display: grid; gap: 4px; font-size: 14px; }
.club-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.club-pick select { flex: 1 1 200px; width: auto; }
td.num, td.nw { white-space: nowrap; }

/* ---- rules ---- */
.seg.three { grid-template-columns: repeat(3, 1fr); }
.rulebook { line-height: 1.6; }
.rulebook h1 { font-size: 1.35rem; margin-top: 0; }
.rulebook h3 { margin: 0 0 4px; font-size: 1.05rem; }
.rulebook ol.rules > li { margin-bottom: 18px; padding-left: 4px; }
.rulebook ol.rules > li::marker { font-weight: 800; }
.rulebook ol ol { margin: 6px 0; }
.rulebook li li { margin-bottom: 4px; }
.rulebook p { margin: 0 0 8px; }
.rulebook ul { padding-left: 20px; margin: 0 0 12px; }
.rulebook .warn { color: var(--danger); }
.rulebook .strong { font-weight: 700; text-decoration: underline; }
.rulebook li.key { background: rgba(194, 65, 59, .06); border-radius: 8px; padding: 10px 10px 4px; }
.rulebook .notice { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; color: var(--muted); }
.rulebook ol { padding-left: 22px; }
.rulebook ol ol { padding-left: 18px; }

/* ---- more menu ---- */
/* Menus: each row floats as its own card. */
.card.menu { display: grid; gap: 12px; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 18px 18px; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.menu-item b { font-size: 17px; }
.menu-item:hover { background: var(--surface-2); }
.mi-icon { font-size: 22px; width: 28px; text-align: center; }
.mi-text { flex: 1; min-width: 0; display: grid; }
.mi-text span { color: var(--muted); font-size: 14px; }
.mi-go { color: var(--muted); font-size: 24px; }
.me-card { display: flex; align-items: center; gap: 14px; }
.me-card img, .me-ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--line); font-size: 28px; flex: none; }
.back { margin: 0 0 8px; }
.back a { text-decoration: none; font-weight: 600; }
label[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.chip a { text-decoration: none; color: var(--muted); }
.member.guest select { width: auto; padding: 4px 8px; font-size: 14px; }

/* ---- icons (replace emoji) ---- */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
button.liked .icon { fill: currentColor; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand .mark { width: 34px; height: 34px; fill: currentColor; flex: none; }
.brand span { font-size: 17px; letter-spacing: .01em; }
/* Narrow phones: the name and the JHMMC badge still fit on one line. */
@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .brand { gap: 6px; }
  .brand span { font-size: 15px; letter-spacing: 0; }
  .brand .mark { width: 26px; height: 26px; }
}
@media (max-width: 340px) {
  .brand span { font-size: 13.5px; }
}
.catch-photo.placeholder .marlin { width: 48%; max-width: 240px; height: auto; fill: rgba(255, 255, 255, .85); }
.pcard .ph .icon { width: 56px; height: 56px; color: rgba(255, 255, 255, .8); stroke-width: 1.5; }
.me-ph .icon { width: 30px; height: 30px; color: var(--muted); }
.mi-icon { display: grid; place-items: center; color: var(--accent); }
.mi-icon .icon { width: 22px; height: 22px; }
.search .icon { color: var(--muted); }

/* ---- admin ---- */
.member-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.member-row[hidden] { display: none; }
.member-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.member-row button { padding: 6px 10px; font-size: 14px; }
.reset-out { grid-column: 1 / -1; display: grid; gap: 6px; }
.reset-out[hidden] { display: none; }
.reset-out .actions { margin-top: 0; }
.admin-mail { font-size: 1.1rem; overflow-wrap: anywhere; }

/* ---- points and officials ---- */
.badge.status.ok { background: rgba(31, 138, 91, .15); color: var(--good); }
.badge.status.wait { background: rgba(242, 163, 58, .18); color: #9a5b00; }
.badge.status.no { background: rgba(194, 65, 59, .12); color: var(--danger); }
.official { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; font-size: 14px; color: var(--muted); }
.official p { margin: 0 0 6px; }
.scale-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; }
.thumbs { display: flex; gap: 8px; margin: 8px 0; }
.thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.review { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 8px; }
.review .actions { margin-top: 0; }
.review-item { margin-bottom: 12px; }
.sheet h2 .small, .sheet h3 .small, .station-head .small { font-weight: 400; }
.result { margin-bottom: 12px; }
.list.compact li { padding: 8px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.num-right { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.ppk { width: 90px; text-align: right; padding: 6px 8px; }
.member-row .role { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.member-row .role select { width: auto; padding: 4px 8px; }
.member-row .delete-user { grid-column: 1 / -1; text-align: right; }
.member-row .delete-user button { padding: 0; font-size: 13px; }

/* ---- quick post ---- */
.photo-pick { display: grid; gap: 8px; font-weight: 600; }
.photo-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.photo-cta:focus-visible { border-color: var(--accent); outline: none; }
.photo-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-menu[hidden] { display: none; }
.photo-menu .btn { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.photo-menu .btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-menu input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-preview img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: var(--line); border-radius: var(--radius); }
.photo-preview[hidden] { display: none; }
/* ---- catch location ---- */
.spot-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spot-row button { font-weight: 600; }
.spot-map { margin: 10px 0; }
.spot-map-view { width: 100%; height: 240px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; z-index: 0; }
.spot-map p { margin: 6px 0 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.spot-map .icon { width: 16px; height: 16px; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- registration sheet ---- */
fieldset.fish { border: 1px solid var(--line); margin: 0; display: grid; gap: 12px; }
fieldset.fish legend { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
button.link { background: none; border: 0; padding: 0; font-size: 14px; text-decoration: underline; min-height: 0; }
button.link[hidden] { display: none; }
.station-fixed { margin: 0; }
.member-row .role { flex-wrap: wrap; }
.member-row .role label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.member-row .role label[hidden] { display: none; }
.points-field { display: grid; gap: 4px; }
.points-label { font-weight: 600; font-size: 14px; }
.points-preview { margin: 0; font-size: 14px; padding: 10px 12px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.points-preview b { font-size: 1.05rem; }
.sheet-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-totals div { background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; }
.sheet-totals span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.sheet-totals b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.points-preview.good { color: var(--good); }
.points-preview.bad { color: var(--danger); }
.sheet-totals small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }

/* ---- points bar graph ---- */
.bars { --bar: var(--accent); --zero-line: #3a4f70; display: grid; gap: 6px; }
.bar-row {
  display: grid; grid-template-columns: minmax(0, 34%) 1fr; align-items: center; gap: 10px;
  min-height: 32px; color: var(--text); text-decoration: none; border-radius: 8px;
}
.bar-row:hover, .bar-row:focus-visible { background: var(--surface-2); }
.bar-name { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; padding-left: 4px; }
.bar-track { position: relative; height: 24px; }
.bar-track::before { content: ""; position: absolute; top: -3px; bottom: -3px; left: var(--zero); border-left: 1px solid var(--zero-line); }
.bar { position: absolute; top: 4px; height: 16px; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar.neg { border-radius: 4px 0 0 4px; }
.bar-value { position: absolute; top: 0; line-height: 24px; padding: 0 6px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- scale photo on the weigh sheet ---- */
.scale-pick { display: grid; gap: 8px; }
.scale-label { font-weight: 600; }
.scale-preview { width: 100%; max-height: 260px; object-fit: contain; background: var(--line); border-radius: 8px; }
.scale-preview[hidden] { display: none; }
.scale-button, .scale-video-button, .roll-video-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-align: center; line-height: 1.2; min-width: 0; }
.scale-button .icon, .scale-video-button .icon, .roll-video-button .icon { width: 18px; height: 18px; vertical-align: 0; flex: none; }
.scale-button:focus-within, .scale-video-button:focus-within, .roll-video-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The camera inputs are hidden behind their buttons (no "Choose file" box). */
.scale-button input, .scale-video-button input, .roll-video-button input, .photo-menu input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }

/* ---- review badge & notifications ---- */
.nav-icon { position: relative; display: inline-flex; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.nav-icon .count-badge { position: absolute; top: -7px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; box-shadow: 0 0 0 2px var(--brand); }
.menu-item .count-badge { margin-left: auto; }
.notify { margin-bottom: 16px; }
.notify p { margin: 0 0 6px; }
.notify p:last-child { margin-bottom: 0; }
.notify-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.notify-row .icon { width: 18px; height: 18px; color: var(--good); }

/* ---- review screen split by weigh station ---- */
.station-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 4px; scrollbar-width: none; }
.station-tabs::-webkit-scrollbar { display: none; }
.station-tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none;
}
.station-tab[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.station-tab[aria-current="page"] .tab-count { background: rgba(255, 255, 255, .25); color: inherit; }
.station { margin-top: 8px; }
.station-head { margin-top: 20px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.station .sheet h3 { margin: 16px 0 8px; font-size: 1.05rem; }
.notify.notify-on { margin: 0 0 12px; }
.notify.notify-on p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.notify.notify-on .icon { width: 16px; height: 16px; color: var(--good); }
.notify.notify-on button.link { font-size: inherit; }
.station-tab.none:not([aria-current="page"]) { color: var(--muted); font-weight: 500; }
.station:not(:has(.review-item)) .station-head { color: var(--muted); font-size: 1rem; }

/* ---- admin boats page ---- */
.boat-row { display: grid; gap: 10px; }
.boat-row[hidden] { display: none; }
.boat-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--text); text-decoration: none; }
.boat-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.boat-fields label { font-size: 14px; }
@media (max-width: 420px) { .boat-fields { grid-template-columns: 1fr; } }

/* ---- disputes & the registration record ---- */
.disputes { margin: 10px 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.disputes p { margin: 0 0 6px; }
.disputes p:last-child { margin-bottom: 0; }
.disputes .icon, .dispute-note .icon { width: 16px; height: 16px; color: var(--danger); vertical-align: -3px; }
.dispute-note { color: var(--danger); }
.pending-item .meta { margin: 4px 0 8px; }
.pending-item [data-act=dispute] { display: inline-flex; align-items: center; gap: 6px; }
.pending-item [data-act=dispute] .icon { width: 16px; height: 16px; vertical-align: 0; }
.pending-item [data-act=dispute][hidden], .dispute-form[hidden] { display: none; }
.dispute-form { margin-top: 10px; }
.log-entry { display: grid; gap: 2px; }
.log-note { padding: 6px 10px; margin-top: 4px; border-left: 3px solid var(--line); color: var(--text); }
.badge.log-approved { background: color-mix(in srgb, var(--good) 15%, var(--surface)); color: var(--good); }
.badge.log-rejected, .badge.log-disputed, .badge.log-deleted { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.badge.log-withdrawn { color: var(--muted); }
.check.declare { align-items: flex-start; font-size: 14px; }
.check.declare input { margin-top: 3px; flex: none; }
.rulebook .app-rules { margin-top: 24px; padding-top: 12px; border-top: 2px solid var(--line); }
.log-filter { display: block; margin-bottom: 12px; }
.tournament-now { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--sun) 18%, var(--surface)); }
.tournament-now .icon { color: var(--sun); }

/* ---- feed filters behind one button ---- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-toggle.on { background: var(--accent); color: var(--accent-ink); }
.filter-toggle.on .tab-count { background: rgba(255, 255, 255, .25); color: inherit; }
.filter-bar .chip { background: var(--surface); border-color: var(--line); color: var(--text); padding: 6px 12px; }
.filter-bar .chip a { color: var(--muted); }

/* ---- JHMMC record book ---- */
.book-list { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 14px; display: grid; gap: 8px; }
.book-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; }
.book-list .rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.book-list .muted.small { display: block; font-size: 13px; }
.book-list .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge.new { background: rgba(63, 207, 142, .15); color: var(--good); margin-left: 6px; }

/* ---- tournament entries & registration sheet ---- */
.crew-pick, .guests { display: grid; gap: 8px; }
.crew-row, .guest-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.guest-row input[name=guestName] { flex: 1 1 160px; width: auto; }
.crew-row label.check, .guest-row label.check { font-size: 14px; }
.entry-anglers { margin: 8px 0; padding-left: 26px; display: grid; gap: 6px; font-size: 15px; }
.entry-anglers li { padding-left: 4px; }
.entry-anglers li > * { vertical-align: middle; }
.entry-anglers .badge { margin-left: 6px; }
.badge.guest { background: rgba(245, 165, 36, .15); color: var(--sun); }
.entry-anglers .paid { display: inline-flex; margin-left: 8px; font-size: 13px; }
.sheet-boat .catch-head label.check { font-size: 14px; }
.angler-edit { margin-top: 10px; }
.angler-edit[hidden] { display: none; }
.sheet-totals div:nth-child(3):last-child { grid-column: 1 / -1; }
.sheet-totals + .card { margin-top: 12px; }
.member-pay[hidden] { display: none; }
.member-filter { margin-top: 12px; }
#add-person { margin-top: 12px; }
#add-person h3 { margin: 0; }
.member-pay .link { font-size: 13px; }
/* Club members: the Paid tick always sits on the right of the name. */
.member-pay { flex-wrap: nowrap; }
.member-pay > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.member-pay > label.check { flex: none; white-space: nowrap; }
.location-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.location-note .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.log-steps { list-style: none; margin: 8px 0 6px; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.log-steps li { position: relative; }
.log-steps li::before { content: ""; position: absolute; left: -19px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.badge.log-registered { background: var(--surface-2); color: var(--text); }
.list .log-steps li { padding: 0 0 0 2px; border: 0; }
.log-steps li::before { left: -21px; }
.member-row .role-pick[hidden] { display: none; }
.member-row .role-pick { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.member-pay .role-pick { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 500; }
.member-pay .role-pick select { width: auto; padding: 4px 8px; font-size: 13px; }
.member-pay .badge { display: inline-block; margin-top: 6px; }

/* A person's full name under their nickname, on their profile. */
.full-name { margin: -0.5rem 0 0.25rem; font-weight: 600; }.icon.tiny { width: 13px; height: 13px; vertical-align: -2px; }
/* More as a profile tab: your photo or initials. */
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 1.5px currentColor; }
.nav-avatar.initials { display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; background: var(--surface-2); }

/* Switch feeds from the profile card on More. */
.me-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* JHMMC, a club inside the platform: its logo on its own pages. */
.club-logo { display: block; width: 120px; height: auto; margin: 4px 0 8px; }

/* On the JHMMC side: a small JHMMC tag in the header, on every page. */
.club-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 800; text-decoration: none; flex: none; }
.club-chip[hidden] { display: none; }
.club-chip img { width: 22px; height: auto; }
.section-note { margin: -4px 4px 8px; }

/* Photo and video previews on posts and the weigh sheet. */
.video-preview { display: block; width: 100%; max-height: 420px; background: #000; border-radius: var(--radius); }
.video-preview[hidden], .scale-video-preview[hidden] { display: none; }
.photo-cta.has-media { border-style: solid; }
video.catch-photo { display: block; width: 100%; max-height: 70vh; background: #000; }
.scale-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scale-video-preview { display: block; width: 100%; max-height: 260px; background: #000; border-radius: 12px; margin-bottom: 8px; }
.thumbs video { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; background: #000; }

/* The brush at the top right of More: opens the choice of light or dark. */
.page-head { position: relative; }
.theme-pick { position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 5; }
.theme-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.theme-btn .icon { width: 21px; height: 21px; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 190px; display: grid; gap: 6px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.theme-menu[hidden] { display: none; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; }
.theme-menu button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.theme-menu .tick { margin-left: auto; }
:root[data-theme="light"] .badge.status.wait { color: #8a4b00; }/* Kept fish: photo (and optional video). Released: record or choose the release video. */
.fish:not(.is-released) .roll-video-button, .fish:not(.is-released) .roll-photo-button { display: none; }
.scale-button, .scale-video-button, .roll-video-button, .roll-photo-button { position: relative; }
.roll-photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* Install the app. */
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.install-head img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.install-head h1 { margin: 0 0 4px; }
.install-head p { margin: 0; }
.install-steps { margin: 0; padding-left: 40px; display: grid; gap: 10px; }
#install-now { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
[data-install-ready][hidden] { display: none; }
.install-card { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.install-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-card > div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.install-card button { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.install-card .icon { width: 18px; height: 18px; }
/* My catch map. */
.catch-map { height: 380px; margin-bottom: 8px; }
.catch-map .leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; color: #1a242e; }
.year-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.year-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; }
.year-tabs a[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.spot-list li { cursor: pointer; }
.spot-head { font-weight: 600; }
/* Several photos on a post: swipe sideways. */
.gallery-wrap { position: relative; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: 0 0 100%; scroll-snap-align: start; }
.gallery-count { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.gallery-count .icon { width: 14px; height: 14px; }
/* Editing photos. */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pm-photo { position: relative; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--line); }
.pm-photo img, .pm-added { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; border-radius: 12px; }
.pm-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 22px; }
.pm-photo[aria-pressed="true"] { border-color: var(--danger); }
.pm-photo[aria-pressed="true"] img { opacity: .35; }
.pm-photo[aria-pressed="true"] .pm-x { background: var(--danger); }
.pm-added { border: 2px solid var(--good); }
.pm-new:empty { display: none; }
.photo-manager .photo-menu .btn { gap: 6px; }
/* Places the club marks on the maps (Marshall...). */
.leaflet-tooltip.place-label { background: rgba(11, 61, 92, .85); color: #fff; border: 0; border-radius: 8px; padding: 2px 7px;
  font: 700 12px/1.3 system-ui, sans-serif; box-shadow: none; }
.leaflet-tooltip.place-label::before { display: none; }

/* The regional log. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip2 { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.chip2.on, .chip2:has(input:checked) { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chip2 input { width: auto; margin: 0; }
.three { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.log-chips { margin: 4px 0 12px; }
.log li { display: grid; gap: 3px; }
.log-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.log-res { font-size: 15px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 3px; }
.pill.released { background: rgba(63, 207, 142, .15); color: var(--good); }
.pill.kept { background: var(--accent-soft); color: var(--accent); }
.pill.lost { background: rgba(255, 107, 107, .14); color: var(--danger); }
.log-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stats3 .s { padding: 10px; text-align: center; display: grid; }
.stats3 b { font-size: 22px; }
.stats3 span { font-size: 12px; color: var(--muted); }
.season-species { font-weight: 700; display: grid; gap: 6px; }
.month-bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 4px; height: 90px; margin-top: 10px; }
.month-bars .mb { height: 100%; display: flex; align-items: flex-end; }
.month-bars i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.month-names { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 11px; color: var(--muted); text-align: center; }
.best-card { display: grid; gap: 4px; }
.club-pick { display: grid; gap: 4px; font-weight: 600; margin-bottom: 12px; }

/* Tap a number on the points tables for the fish behind it. */
a.drill { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; display: inline-block; min-width: 28px; padding: 4px 0; }
.drill-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.drill-list a > span { display: grid; }
.drill-pts { white-space: nowrap; color: var(--accent); }

.fates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fate { padding: 18px 6px; font-size: 17px; font-weight: 800; border-radius: 14px; border: 1px solid transparent; cursor: pointer; }
.fate.released { background: rgba(63, 207, 142, .16); color: var(--good); border-color: rgba(63, 207, 142, .45); }
.fate.kept { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.fate.lost { background: rgba(255, 107, 107, .12); color: var(--danger); border-color: rgba(255, 107, 107, .4); }
.fate:active { transform: scale(.97); }
.log-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.notes.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 0; }
.units { display: grid; gap: 10px; }
fieldset.units { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.units legend { font-weight: 600; margin-bottom: 4px; }
.unit-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.unit-row .chips { margin: 0; }
.unit-row input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.unit-row .chip2 { position: relative; }
/* Points | Records: plain text tabs, underlined, like a profile's tabs. */
.line-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 4px 0 12px; }
.line-tabs a { padding: 8px 2px; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.line-tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
/* Small dropdown chips on one line (Overall ▾  Ocean ▾). */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
select.chip-select { width: auto; min-height: 0; padding: 5px 28px 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background-color: var(--accent-soft); color: var(--accent); border-color: transparent; }
/* Log fish: the boat, and the day as a chip that opens the date picker. */
.fo-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 6px; font-weight: 700; }
.chip-date { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; }
.chip-date::after { content: '▾'; font-size: 11px; }
.chip-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.shared-fish { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
/* Log fish: the boat's usual fish as big buttons, one tap each. */
.quick-species { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qs { position: relative; display: block; }
.qs input { position: absolute; opacity: 0; pointer-events: none; }
.qs span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px 8px; text-align: center; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer; }
.qs input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.qs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.quick-species[hidden] { display: none; }
/* Boat and profile photo: the saved one, and a button to change it. */
.photo-field { display: grid; gap: 6px; }
.photo-field-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-field-img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.photo-field-img[hidden] { display: none; }
/* The feed: weigh-ins and fish logged at sea, under the boat. */
.feed-tabs { margin-bottom: 12px; }
.feed-list { padding: 0; }
.feed-item { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.feed-item:last-child { border-bottom: 0; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feed-boat { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 17px; }
.feed-boat img, .feed-ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.feed-ph { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feed-ph svg { width: 28px; height: 28px; overflow: visible; }
.feed-line { margin: 0; font-size: 17px; font-weight: 700; }
.feed-line a { color: inherit; text-decoration: none; }
.feed-item .pill { justify-self: start; margin-left: 0; }
.feed-tabs { overflow-x: auto; scrollbar-width: none; white-space: nowrap; gap: 14px; justify-content: space-between; }
.feed-tabs a { font-size: 15px; }
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tabs a { flex: none; }
.club-mark { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 3px; }
.feed-item.announcement { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ann-title { margin: 2px 0 0; font-size: 20px; line-height: 1.25; }
.ann-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.ann-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill.ann { background: var(--accent-soft); color: var(--accent); margin-left: 0; }
.ann-new summary { cursor: pointer; font-weight: 700; color: var(--accent); list-style: none; display: flex; align-items: center; gap: 8px; }
.ann-new summary::-webkit-details-marker { display: none; }
.ann-new[open] summary { margin-bottom: 12px; }
.feed-notify:not(:empty) { margin-bottom: 12px; }
/* Notifications: one row per kind, with an on/off switch. */
.notify-kind { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notify-kind:last-child { border-bottom: 0; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; min-height: 0; padding: 0; border: 0; box-shadow: none; outline-offset: 2px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(20px); }
/* A boat's weigh-in for the day: one post, a line per fish. */
.weighin-fish { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.weighin-fish li + li { border-top: 1px solid var(--line); }
.weighin-fish a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; color: var(--text); text-decoration: none; }
.weighin-fish a span:last-child { font-weight: 700; white-space: nowrap; }
.weighin-fish small { font-weight: 600; margin-left: 6px; }
.weighin-total { display: flex; justify-content: space-between; padding: 8px 12px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.row-buttons { display: flex; gap: 8px; margin-top: 8px; }
a.me-card { color: var(--text); text-decoration: none; }
.me-link { color: var(--accent); font-weight: 700; margin-top: 2px; }
/* A tournament coming up: the captain's way in, at the top of the feed. */
.tournament-call { display: grid; gap: 4px; margin-bottom: 12px; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.tournament-call .tc-head { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.tournament-call .tc-name { font-size: 22px; line-height: 1.2; }
.tournament-call .btn { justify-self: start; margin-top: 8px; padding: 12px 22px; font-size: 17px; }
.tournament-in { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--text); text-decoration: none; }
.tournament-in .icon { color: var(--good); }
.tournament-in > span:nth-of-type(1) { flex: 1; }
.tournament-in .small { color: var(--accent); font-weight: 700; white-space: nowrap; }
/* Fish boarded today, not weighed in yet: the way to the weigh-in. */
.weigh-call { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--text); text-decoration: none; flex-wrap: wrap; }
.weigh-call > .icon { width: 28px; height: 28px; color: var(--accent); }
.weigh-call > span:nth-of-type(1) { flex: 1; display: grid; min-width: 150px; }
/* Photos: a logged fish's photo, and a weigh-in's scale photos and release videos. */
.feed-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; }
.feed-gallery { border-radius: 14px; overflow: hidden; margin: 6px 0; }
.feed-gallery .catch-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
/* Log fish: each fish's photo square, on the right of its row. */
.fo-row { display: flex; align-items: center; gap: 12px; }
.fo-main { flex: 1; min-width: 0; }
.fo-photo { flex: none; width: 64px; height: 64px; border-radius: 14px; border: 1.5px dashed var(--line); display: grid; place-items: center; align-content: center; gap: 2px;
  color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; overflow: hidden; background: var(--surface); }
.fo-photo .icon { width: 22px; height: 22px; }
.fo-photo img { width: 100%; height: 100%; object-fit: cover; }
.fo-photo:has(img) { border: 0; }
.is-released .scale-hint { display: none; }
/* The season report: key numbers, and simple bars. */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis .s { display: grid; gap: 2px; padding: 12px 8px; text-align: center; }
.kpis .s b { font-size: 22px; line-height: 1.1; }
.kpis .s span { font-size: 12px; color: var(--muted); }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 8px; padding: 4px 0; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar i { display: block; height: 12px; border-radius: 6px; background: var(--accent); }
.hour-bars { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; align-items: end; height: 90px; }
.hour-bars .mb { height: 100%; display: flex; align-items: end; }
.hour-bars i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); }
.hour-names { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
/* Trends: validated categorical series (light / dark), thin lines, recessive grid. */
:root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; }
:root[data-theme="light"] { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; }
.tr-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tr-grid { stroke: var(--line); stroke-width: 1; }
.tr-axis { font-size: 10px; fill: var(--muted); }
.tr-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tr-dot { stroke: var(--bg); stroke-width: 2; }
.tr-label { font-size: 11px; font-weight: 700; fill: var(--text); }
.tr-s1 .tr-line { stroke: var(--series-1); } .tr-s1 .tr-dot, .tr-s1 .tr-bar { fill: var(--series-1); }
.tr-s2 .tr-line { stroke: var(--series-2); } .tr-s2 .tr-dot { fill: var(--series-2); }
.tr-s3 .tr-line { stroke: var(--series-3); } .tr-s3 .tr-dot { fill: var(--series-3); }
.tr-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; font-size: 13px; font-weight: 700; }
.tr-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tr-legend .tr-s1 i { background: var(--series-1); } .tr-legend .tr-s2 i { background: var(--series-2); } .tr-legend .tr-s3 i { background: var(--series-3); }
.tr-legend a { margin-left: auto; font-weight: 600; }
.biting { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
/* Log fish at sea: the buttons wait for the GPS spot. */
.fates.waiting .fate { opacity: .45; }
.gps-wait { color: var(--accent); font-weight: 700; }
/* Editing a logged fish, in its row. */
.fo-row:has(.fo-edit) { flex-wrap: wrap; }
.fo-edit { flex-basis: 100%; padding-top: 8px; }
.fo-edit .fate { padding: 10px 6px; font-size: 15px; }
.fo-edit .fate.on { outline: 3px solid currentColor; outline-offset: -3px; }
/* The feed shown without signal: the last one seen. */
.offline-note { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.12)); }
/* Several of a species weighed: their weights together, under the list. */
.fo-weighed { font-size: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
/* The secretary's box on an approved fish. */
.secretary-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border, rgba(127,127,127,.25)); }
.secretary-box h3 { margin: 0; font-size: 16px; }
/* The photo for the feed, on the weigh-in sheet. */
.feed-pick { margin-top: 12px; }
.feed-preview { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; }
.feed-preview[hidden] { display: none; }
/* A weighed fish's photo, added later by the angler or crew. */
.add-photo { display: flex; justify-content: center; margin: 10px 0; }
/* A crew's own weigh-in post: add the photos for the feed. */
.add-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.add-photos > span { flex-basis: 100%; }
.add-photos .btn.busy { opacity: .5; pointer-events: none; }
/* A boat's or angler's page: their fish to show off. */
.trophy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.trophy-stats .card { padding: 10px 8px; text-align: center; }
.trophy-stats b { display: block; font-size: 22px; }
.trophy-stats span { font-size: 12px; color: var(--muted); }
.trophy-best { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 12px; color: inherit; text-decoration: none; }
.trophy-best img, .trophy-best .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.trophy-best .ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #2a5a9a, #17213a); color: #fff; }
.trophy-best .ph svg { width: 70%; height: 70%; opacity: .6; fill: currentColor; }
.trophy-best > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trophy-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; scrollbar-width: none; }
.trophy-chips::-webkit-scrollbar { display: none; }
.trophy-chips button { flex: none; padding: 6px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.trophy-chips button.on { background: var(--accent); color: var(--accent-ink); }
.trophy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 14px; overflow: hidden; }
.trophy { position: relative; aspect-ratio: 1; }
.trophy > a { position: absolute; inset: 0; display: block; background: linear-gradient(160deg, #2a5a9a, #17213a); color: #fff; text-decoration: none; }
.trophy img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trophy .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .5; }
.trophy .ph svg { width: 56%; height: 56%; fill: currentColor; }
.trophy .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-size: 11.5px; line-height: 1.25; }
.trophy .cap b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trophy .tag { position: absolute; top: 5px; left: 5px; background: #059669; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.trophy-add { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.trophy-add .icon { width: 16px; height: 16px; }
.trophy-add.busy { opacity: .5; pointer-events: none; }
/* Tags on the profile wall: weighed in (official), or as logged at sea. */
.trophy .tag.weighed { background: #1d4ed8; }
.trophy .tag.boated { background: #b45309; }
.trophy-stats { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.trophy-stats b { font-size: 20px; }
/* A warning card (e.g. backups not emailed). */
.warn-card { border-left: 4px solid #d97706; }
/* The reminder on officers' pages: who is notified, and that it's recorded. */
.record-note { display: flex; gap: 10px; align-items: flex-start; border-left: 4px solid var(--accent); margin: 8px 0 14px; }
.record-note .icon { flex: none; margin-top: 2px; }
/* Your card on More: the card opens your dashboard; the pencil edits your profile. */
.me-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.me-who { display: flex; flex-direction: column; min-width: 0; }
.me-edit { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--accent); align-self: flex-start; }
.me-edit .icon { width: 20px; height: 20px; }
/* A boat's page: its name, and the crew's pencil to manage it. */
.boat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.boat-head h1 { margin-bottom: 0; }
/* Your card on More: your dashboard and your boat's, side by side. */
.me-photo { flex: none; line-height: 0; }
.me-links { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 2px; }
.me-links .me-link { text-decoration: none; }
/* The secretary desk. */
.desk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 14px; }
.desk-kpis a { padding: 12px 8px; text-align: center; text-decoration: none; color: var(--text); }
.desk-kpis b { display: block; font-size: 26px; }
.desk-kpis span { font-size: 12px; color: var(--muted); }
.desk-kpis .hot b { color: #dc2626; }
.desk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.desk-row:first-child { border-top: 0; }
.desk-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.desk-row small { color: var(--muted); }
.desk-link { display: block; color: var(--text); text-decoration: none; }
.pill-red, .pill-amber { flex: none; border-radius: 99px; padding: 2px 9px; font-weight: 700; font-size: 12px; }
.pill-red { background: #fee2e2; color: #b91c1c; }
.pill-amber { background: #fef3c7; color: #92400e; }
.desk-short { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.desk-short a { padding: 14px; text-align: center; font-weight: 700; text-decoration: none; }
a.tournament-call { color: var(--text); text-decoration: none; }
.join-card .btn { justify-self: start; margin-top: 6px; }
#add-member h3, #add-member p { margin: 0; }

/* The demo copy's strip under the header, and its one-tap accounts. */
.demo-bar {
  background: #f5a524;
  color: #1d1e21;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin: 8px 12px 0;
  padding: 6px 12px;
  border-radius: var(--radius);
}
.demo-bar a { color: inherit; }
.demo-accounts button { width: 100%; }

/* Weighmasters: a captain per row, his station on the right. */
.wm-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.weigher { margin: 6px 0; }

/* A weighmaster's boats at his station: tap one, weigh it, tap the next. */
.wm-boat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.wm-boat-chips .chip { border-radius: 999px; padding: 8px 14px; }
.wm-boat-chips .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
