@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;650;700;750;800&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap");

:root {
  /* Clear Day palette: bright surfaces, gold reserved for the brand and the data */
  --bg: #f3f5f1;
  --bg-2: #ffffff;
  --ink: #121812;
  --muted: #4f5a4c;
  --label: #5d6858;
  --accent: #cfa53a;
  --accent-2: #8a6a12;
  --accent-ink: #121812;
  --gold-deep: #b8891b;
  --gold-soft: #fbf6e6;
  --gold-line: #efe0b0;
  --gold-text: #6e540a;
  --spruce: #1f2b1c;
  --pos: #1d5e33;
  --warn: #b86e00;
  --bad: #9a3412;
  --line: #e2e7de;
  --field-line: #d6dcd1;
  --soft: #eef1ea;
  --radius-card: 22px;
  --shadow-card: 0 1px 2px rgba(18, 24, 18, 0.04);
  --font: "Figtree", system-ui, sans-serif;
  /* Headings now use the same sans as the UI; the serif is kept for the brand name and big numbers */
  --font-display: "Figtree", system-ui, sans-serif;
  --font-brand: "Fraunces", Georgia, serif;
  --header-h: 4rem;
  --bottom-nav-h: 0px;
  --tap: 44px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--spruce); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; color: var(--accent-2); }

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(42, 51, 32, 0.08);
  background: transparent;
  position: sticky;
  top: 0;
  flex-wrap: nowrap;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(42, 51, 32, 0.08);
}

.brand-text {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.nav-desktop {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 650;
}

.nav-desktop a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav-bottom { display: none; }

.units-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-2);
}

.units-toggle .unit {
  padding: 0.35rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
}

.units-toggle .unit:hover { text-decoration: none; color: var(--ink); }

.units-toggle .unit.active {
  background: var(--accent);
  color: var(--accent-ink);
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 calc(3rem + var(--bottom-nav-h));
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: 12px;
}

.table-scroll .data { margin-bottom: 0; min-width: 520px; }

.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lede { margin: 0 0 1.25rem; color: var(--muted); }

.inline-form,
.stack-form {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(42, 51, 32, 0.05);
}

.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 650;
}

input, select, textarea, button {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--field-line);
  background: #ffffff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(201, 162, 39, 0.55);
  outline-offset: 1px;
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  font-weight: 750;
  cursor: pointer;
}

button:hover { background: #c29427; color: var(--accent-ink); }

button.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid var(--bad);
}

.score-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: 0 10px 28px rgba(42, 51, 32, 0.06);
}

.score-num {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  align-self: center;
}

.score-label { font-size: 1.25rem; font-weight: 750; }
.score-great .score-num { color: #5a7a32; }
.score-good .score-num { color: #4d6238; }
.score-fair .score-num { color: var(--warn); }
.score-poor .score-num { color: var(--bad); }

.conditions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.data {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--bg-2);
  border-radius: 12px;
  overflow: hidden;
}

.data th, .data td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data th { color: var(--muted); font-weight: 650; background: var(--soft); }

.filters { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 1rem; font-weight: 650; }

.filters a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.trip {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: 0 6px 18px rgba(42, 51, 32, 0.05);
}

.trip h2 { margin: 0 0 0.25rem; font-size: 1.2rem; font-family: var(--font-display); }
.meta { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.9rem; }

.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.photo-row img {
  width: 168px;
  height: 126px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  background: var(--soft);
}

.flash {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 650;
}

.flash-error {
  color: var(--bad);
  background: rgba(181, 74, 58, 0.12);
  border-color: rgba(181, 74, 58, 0.28);
}

.flash-ok {
  color: #3d5a28;
  background: rgba(107, 127, 90, 0.18);
  border-color: rgba(107, 127, 90, 0.35);
}

.photo-upload-status {
  margin: 0.35rem 0 0;
}

.photo-upload-status.is-error {
  color: var(--bad);
}

.photo-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0;
}

.photo-preview-card {
  margin: 0;
  width: 96px;
}

.photo-preview-card img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}

.photo-preview-card figcaption {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.photo-upload-form {
  margin-top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crew-section {
  margin: 0 0 1.5rem;
}

.crew-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.35rem 0 0.65rem;
}

.crew-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.crew-chip:hover {
  text-decoration: none;
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.12);
}

.crew-chip.is-active {
  background: rgba(201, 162, 39, 0.32);
  border-color: rgba(201, 162, 39, 0.65);
  color: var(--ink);
}

.crew-pending { margin: 0 0 0.75rem; }

.invite-panel {
  margin: 0.5rem 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.invite-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  font-weight: 650;
}

.invite-panel > summary::-webkit-details-marker { display: none; }

.invite-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.invite-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 0.75rem;
}

.crew-remove-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0;
}

.small-note {
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.catch-feed-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.catch-feed-row:last-child { border-bottom: 0; }

.catch-feed-media img,
.catch-feed-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  background: var(--soft);
}

.catch-feed-placeholder {
  background:
    linear-gradient(135deg, rgba(201, 162, 39, 0.18), transparent 55%),
    var(--soft);
}

/* Extra catch photos (2nd onward) as a small strip under the main thumbnail */
.catch-feed-more {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  width: 96px;
  margin-top: 4px;
}

.catch-feed-media .catch-feed-more img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

.catch-feed-who {
  margin: 0;
  font-weight: 750;
  font-family: var(--font-display);
}

.catch-feed-species {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.catch-feed-lure,
.catch-feed-time,
.catch-feed-notes {
  margin: 0.2rem 0 0;
}

.catch-feed-body .small-btn {
  margin-top: 0.45rem;
}

.trip-invites {
  margin: 0 0 1.5rem;
}

.trip-invite-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.trip-invite-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.trip-invite-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trip-invite-actions button {
  width: auto;
  min-height: 2.4rem;
  padding: 0.35rem 0.9rem;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
  color: var(--ink);
}

.error { color: var(--bad); }
.muted { color: var(--muted); }

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 750;
  vertical-align: middle;
}

.badge:first-child { margin-left: 0; margin-right: 0.35rem; }

.lede.small {
  font-size: 0.95rem;
  margin-top: -0.35rem;
}

.trip-photos {
  margin: 1.25rem 0 1.75rem;
}

.trip-photos h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.photo-card {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.small-btn {
  width: auto;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

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

.spot-header h2 { flex: 1; }

.favorite-form { margin: 0; }

.ghost-btn {
  width: auto;
  min-height: 2.25rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.ghost-btn:hover {
  color: var(--ink);
  background: rgba(201, 162, 39, 0.18);
}

.trip.is-favorite {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.12);
}

.progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
  margin: 0.35rem 0 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.target-card.is-complete .progress-fill {
  background: #5a7a32;
}

.year-filters a[aria-current="page"] {
  background: rgba(201, 162, 39, 0.35);
  color: var(--ink);
  font-weight: 750;
}

.offline-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.2);
  color: var(--ink);
  font-weight: 650;
}

.offline-banner.is-error {
  background: rgba(181, 74, 58, 0.12);
  border-color: rgba(181, 74, 58, 0.35);
  color: var(--bad);
}

.friends-section {
  margin: 1.75rem 0;
}

.friends-section > h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.friend-actions form {
  margin: 0;
}

.friend-actions button {
  width: auto;
  min-width: 6.5rem;
}

.feed-catch {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.1rem;
}

.gear-chip {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(201, 162, 39, 0.18);
  font-size: 0.9rem;
  font-weight: 650;
}

.share-form {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.share-form .meta { margin-bottom: 0.55rem; }

.share-form button {
  width: auto;
}

.location-form {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.location-form .ghost-btn {
  margin-bottom: 0.1rem;
}

.location-status {
  margin: 0.35rem 0 0.5rem;
}

.location-status.is-error {
  color: var(--bad);
}

.privacy-note {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
  max-width: 36rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.home-feed {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.condition-chip {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink);
  line-height: 1.4;
}

.trip-conditions {
  margin: 0 0 1.1rem;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.65rem;
}

.cond-cell {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  display: grid;
  gap: 0.2rem;
}

.cond-label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cond-value {
  font-size: 1.15rem;
  font-weight: 750;
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
}

.trip-moon {
  margin-bottom: 1.35rem;
}

.trip-notes {
  margin: 0 0 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.stats-grid h2 { font-size: 1.1rem; margin: 0 0 0.5rem; font-family: var(--font-display); }

.moon-card {
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  box-shadow: 0 8px 24px rgba(42, 51, 32, 0.05);
}

.moon-card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.moon-headline { margin: 0 0 0.35rem; }
.moon-rating { font-weight: 750; color: #4d6238; }

.moon-windows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.moon-windows h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 750;
}

.moon-windows ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

/* ---- Phone / narrow screens ---- */
@media (max-width: 800px) {
  :root { --bottom-nav-h: calc(3.75rem + env(safe-area-inset-bottom)); }

  .nav-desktop { display: none; }

  .site-header {
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    padding-top: max(0.45rem, env(safe-area-inset-top));
    min-height: 0;
  }

  .brand-text { font-size: 0.98rem; }
  .brand-mark { width: 34px; height: 34px; }

  .wrap {
    width: calc(100% - 1.25rem);
    padding: 1rem 0 calc(1.25rem + var(--bottom-nav-h));
  }

  .hero h1 { font-size: 1.55rem; }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .inline-form,
  .stack-form {
    padding: 0.9rem;
    border-radius: 10px;
  }

  input, select, textarea, button {
    min-height: var(--tap);
    font-size: 1rem; /* avoids iOS zoom on focus */
    width: 100%;
  }

  button { width: 100%; }

  .units-toggle .unit {
    min-height: 2rem;
    min-width: 2.4rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .check {
    min-height: var(--tap);
    padding: 0.25rem 0;
  }

  .score-panel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .score-num {
    grid-row: auto;
    font-size: 2.75rem;
  }

  .conditions { gap: 0.5rem 1rem; }

  .filters {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filters a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-2);
  }

  .photo-row img {
    width: calc(50% - 0.25rem);
    height: auto;
    aspect-ratio: 4 / 3;
  }

  /* Horizontal scroll for wide tables without wrapping every template */
  .data {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    min-height: var(--bottom-nav-h);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(243, 246, 236, 0.96);
    backdrop-filter: blur(12px);
  }

  .nav-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: var(--tap);
    padding: 0.3rem 0.2rem;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
    text-decoration: none;
    text-align: center;
  }

  .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
  }

  .nav-bottom-link:hover,
  .nav-bottom-link.active,
  .nav-more summary.nav-bottom-link.active {
    color: var(--ink);
    background: rgba(201, 162, 39, 0.28);
    text-decoration: none;
  }

  /* Name + Log out live in the bottom bar's More panel on phones. The extra class
     outranks the base .account-menu rule further down, which used to switch it back on. */
  .account-menu.account-menu-desktop { display: none; }

  .nav-more-user {
    margin: 0.35rem 0.75rem 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 650;
  }

  .nav-more-logout {
    width: 100%;
    min-height: var(--tap);
    margin: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    text-align: left;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
  }

  .nav-more-logout:hover {
    background: rgba(201, 162, 39, 0.25);
  }

  .sticky-cta {
    position: sticky;
    bottom: calc(var(--bottom-nav-h) + 0.5rem);
    z-index: 15;
    padding-top: 0.35rem;
  }

  .sticky-cta button {
    box-shadow: 0 8px 24px rgba(42, 51, 32, 0.18);
  }

  .nav-more {
    position: relative;
  }

  .nav-more > summary {
    list-style: none;
    cursor: pointer;
  }

  .nav-more > summary::-webkit-details-marker { display: none; }

  .nav-more-panel {
    position: absolute;
    right: 0.25rem;
    bottom: calc(100% + 0.4rem);
    min-width: 10rem;
    padding: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-2);
    box-shadow: 0 10px 28px rgba(42, 51, 32, 0.12);
    display: grid;
    gap: 0.2rem;
  }

  .nav-more-panel a {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
  }

  .nav-more-panel a:hover,
  .nav-more-panel a[aria-current="page"] {
    background: rgba(201, 162, 39, 0.25);
  }
}

@media (max-width: 480px) {
  .brand-text { white-space: nowrap; }
  .moon-windows { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

.suggest-wrap {
  position: relative;
  display: grid;
}

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 30;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: 0 10px 28px rgba(42, 51, 32, 0.12);
  max-height: 14rem;
  overflow-y: auto;
}

.suggest-item {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(201, 162, 39, 0.28);
}

.suggest-kind {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 4.6rem;
}

.suggest-kind-lake,
.suggest-kind-river,
.suggest-kind-reservoir,
.suggest-kind-marina,
.suggest-kind-creek,
.suggest-kind-bay,
.suggest-kind-water {
  color: #3d5a28;
}

.suggest-kind-spot {
  color: var(--accent-2);
}

.suggest-label {
  flex: 1;
  min-width: 0;
}

.login-wrap {
  max-width: 420px;
  padding-top: 3rem;
}

.auth-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  border-radius: 17px;
  box-shadow: 0 12px 26px -16px rgba(31, 43, 28, 0.7);
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.25rem;
}

.account-name {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink);
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form { margin: 0; }

.logout-link {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  min-height: 2.25rem;
  width: auto;
  padding: 0.35rem 0.7rem;
}

.logout-link:hover {
  background: var(--bg-2);
  color: var(--ink);
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-switch a {
  color: var(--ink);
  font-weight: 650;
}

/* ---- Mobile UX: cards, chips, empty states, motion ---- */
.trip-card,
.continue-trip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.trip-card:hover,
.continue-trip:hover {
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 8px 22px rgba(42, 51, 32, 0.08);
}

.trip-card:active,
.continue-trip:active,
.chip:active,
.gear-card:active {
  transform: scale(0.985);
}

.trip-card-body { flex: 1; min-width: 0; }
.trip-card-body h2,
.continue-trip-label {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.continue-trip {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.2);
  margin-bottom: 1.25rem;
}

.start-trip-cta {
  border-color: var(--line);
  background: var(--bg-2);
}

@media (max-width: 800px) {
  .start-trip-cta {
    position: sticky;
    top: 0.35rem;
    z-index: 12;
  }
}

.continue-trip-label {
  display: block;
  font-weight: 750;
}

.continue-trip-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.card-chevron {
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.trip-card.is-open {
  border-color: rgba(201, 162, 39, 0.45);
}

.badge-soft {
  background: var(--soft);
  color: var(--ink);
}

.list-heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.list-section { margin-bottom: 1.5rem; }

.add-panel {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

.add-panel[open] {
  box-shadow: 0 8px 22px rgba(42, 51, 32, 0.08);
}

.add-panel > summary {
  list-style: none;
  cursor: pointer;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-weight: 750;
}

.add-panel > summary::-webkit-details-marker { display: none; }

.add-panel > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.25rem;
  transition: transform 0.18s ease;
}

.add-panel[open] > summary::after {
  transform: rotate(45deg);
}

.add-panel .nested-form,
.add-panel .stack-form.nested-form {
  margin: 0;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--line);
  box-shadow: none;
}

.more-details {
  margin: 0.5rem 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.more-details > summary {
  list-style: none;
  cursor: pointer;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.more-details > summary::-webkit-details-marker { display: none; }

.more-details[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.more-details label {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0.85rem;
}

.catch-essentials {
  display: grid;
  grid-template-columns: 1fr 4.5rem;
  gap: 0.65rem;
  align-items: end;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0.15rem 0 0.85rem;
  margin-bottom: 0.5rem;
}

.chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip:hover { text-decoration: none; color: var(--ink); }

.chip.is-active,
.chip[aria-current="page"] {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.gear-cards {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.gear-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  transition: transform 0.15s ease;
}

.gear-card h2 {
  margin: 0.35rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.gear-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.type-pill {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.28);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: capitalize;
}

.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(243, 246, 236, 0.7);
}

.empty-state.compact {
  padding: 1rem;
}

.empty-state p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 650;
}

.empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  text-decoration: none;
}

.empty-cta:hover {
  text-decoration: none;
  background: var(--accent-2);
  color: var(--accent-ink);
}

.trip-footer-actions {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.sticky-cta { margin-top: 0.35rem; }

@media (min-width: 801px) {
  .nav-icon { display: none; }
  .account-menu-desktop { display: flex; }
}

/* ======================================================================
   Redesign, Nov 2026: Clear Day base, gold score ring, bite timeline.
   Shared chrome first, then components, then Forecast and Trip pages.
   Phone overrides live in the media blocks at the end of this section.
   ====================================================================== */

/* ---- App chrome ---- */
.site-header {
  min-height: 64px;
  padding: 0 1.5rem;
  padding-top: env(safe-area-inset-top);
  align-items: stretch;
  gap: 2rem;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.site-header > .brand,
.site-header > .units-toggle,
.site-header > .account-menu { align-self: center; }
.brand { font-weight: 600; letter-spacing: 0; }
.brand-mark { border: 0; box-shadow: none; border-radius: 9px; width: 36px; height: 36px; }
.brand-text { font-size: 1.15rem; font-weight: 600; }

.nav-desktop { align-items: stretch; gap: 1.4rem; flex-wrap: nowrap; }
.nav-desktop a {
  display: flex;
  align-items: center;
  padding-top: 3px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.nav-desktop a:hover { color: var(--ink); text-decoration: none; }
.nav-desktop a[aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-bottom-color: var(--gold-deep);
}

.units-toggle { border: 0; border-radius: 10px; padding: 3px; gap: 2px; background: var(--soft); overflow: visible; }
.units-toggle .unit { border-radius: 8px; padding: 0.3rem 0.65rem; color: var(--muted); font-weight: 700; }
.units-toggle .unit.active { background: #ffffff; color: var(--ink); box-shadow: 0 1px 2px rgba(18, 24, 18, 0.12); }

.wrap-wide { width: min(1160px, calc(100% - 2rem)); }
.wrap-trip { width: min(760px, calc(100% - 2rem)); padding-bottom: 7rem; }

/* ---- Shared components ---- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.15rem 1rem;
}
.card h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; }
.card-kicker,
.card .card-kicker { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--label); letter-spacing: 0; }
.fine-print { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--label); }
.section-head h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -10px rgba(110, 84, 10, 0.7); }
.btn-gold:hover { background: #c29427; color: var(--accent-ink); }
.btn-dark { background: var(--spruce); color: #ffffff; }
.btn-dark:hover { background: #2d3d29; color: #ffffff; }
.btn-quiet { background: #ffffff; color: var(--ink); border-color: var(--field-line); }
.btn-quiet:hover { background: var(--soft); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 0.85rem; font-size: 0.88rem; border-radius: 10px; }
.btn-block { width: 100%; min-height: 52px; border-radius: 14px; font-size: 1rem; }

.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn-plain { border-color: transparent; background: transparent; }
.icon-btn-plain:hover { background: var(--soft); }
summary.icon-btn::-webkit-details-marker,
summary.hero-btn::-webkit-details-marker { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}
.chip-tag.is-live { background: #e3f0df; color: var(--pos); }

details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 230px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 34px -12px rgba(18, 24, 18, 0.35);
}
.menu-panel form { margin: 0; }
.menu-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover { background: var(--soft); color: var(--ink); }
.menu-item.is-danger { color: var(--bad); }
.menu-item.is-danger:hover { background: #fbeee9; color: var(--bad); }

.switch {
  position: relative;
  width: 52px;
  height: 32px;
  min-height: 0;
  padding: 0;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: var(--field-line);
  cursor: pointer;
}
.switch:hover { background: #c7cfc1; }
.switch span {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(18, 24, 18, 0.3);
  transition: transform 0.15s ease;
}
.switch.is-on { background: var(--gold-deep); }
.switch.is-on:hover { background: #a67b15; }
.switch.is-on span { transform: translateX(20px); }

.avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--spruce);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}

.empty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: #ffffff;
  border: 1px dashed var(--field-line);
}
.empty-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--accent-2);
}
.empty-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.88rem; color: var(--muted); }
.empty-text strong { color: var(--ink); font-size: 0.98rem; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 14px;
  border-radius: 16px;
  border: 1.5px dashed #b9c3ab;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}
.dropzone:hover { border-color: var(--gold-deep); background: var(--gold-soft); }
.dropzone:focus-within { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
}
.dropzone-title { font-weight: 800; }
.dropzone-sub { font-size: 0.82rem; color: var(--muted); }
.dropzone-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
  justify-items: start;
  padding: 12px 14px;
  text-align: left;
}
.dropzone-compact .dropzone-icon { grid-row: span 2; }
.dropzone .photo-upload-status,
.dropzone .photo-preview-row { grid-column: 1 / -1; position: relative; z-index: 1; }

/* ---- Forecast page ---- */
.fc-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.fc-place { flex: 1; min-width: 0; }
.place-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.place-picker > summary::-webkit-details-marker { display: none; }
.place-picker > summary svg { color: var(--muted); flex-shrink: 0; transition: transform 0.15s ease; }
.place-picker[open] > summary svg { transform: rotate(180deg); }
.place-form { display: flex; gap: 8px; max-width: 560px; margin-top: 10px; }
.place-form .suggest-wrap { flex: 1; min-width: 0; }
.place-form input { width: 100%; min-height: 44px; border-radius: 12px; }
.place-form button { width: auto; min-height: 44px; padding: 0 1rem; border-radius: 12px; white-space: nowrap; }
.place-picker .place-locate { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); margin-top: 8px; }
.place-picker .privacy-note { margin: 8px 0 0; font-size: 0.78rem; color: var(--label); }
.fc-date { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.location-status { margin: -6px 0 12px; }

.fc-grid { display: grid; gap: 14px; }

.ring { position: relative; display: block; }
.ring svg { display: block; width: 100%; height: 100%; }
.ring-track { fill: none; stroke: #f2ecd9; }
.ring-fill { fill: none; stroke: var(--gold-deep); stroke-linecap: round; }
.ring-lg { width: 208px; height: 208px; margin: 6px auto 0; }
.ring-lg .ring-track,
.ring-lg .ring-fill { stroke-width: 16; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num {
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 4.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ring-label {
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.ring-sm { width: 46px; height: 46px; flex-shrink: 0; }
.ring-sm .ring-track,
.ring-sm .ring-fill { stroke-width: 5; }
.ring-sm .ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
}

.scale { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 14px; }
.scale-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--label);
  font-size: 0.78rem;
  font-weight: 700;
}
.scale-step small { font-size: 0.7rem; font-weight: 600; }
.scale-step.is-current { background: var(--gold-soft); color: var(--gold-text); box-shadow: inset 0 0 0 1.5px var(--gold-deep); }

.card .factors-head { margin: 18px 0 4px; }
.factors { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.factor { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--soft); }
.factor-icon { color: var(--muted); flex-shrink: 0; }
.factor-label { flex: 1; min-width: 0; }
.factor-value { color: var(--muted); }
.factor-pts { font-weight: 800; }
.factor-pts.is-pos { color: var(--pos); }
.factor-pts.is-neg { color: var(--bad); }

.bite-head { display: flex; align-items: center; gap: 12px; }
.bite-head p { margin: 1px 0 0; color: var(--muted); font-size: 0.85rem; }
.moon-icon { flex-shrink: 0; }
.daybar { position: relative; height: 14px; margin-top: 38px; border-radius: 999px; background: var(--soft); }
.daybar-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.daybar-seg.is-major { background: var(--gold-deep); }
.daybar-seg.is-minor { background: #e6cf87; }
.daybar-now { position: absolute; top: -7px; bottom: -7px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.daybar-now-label {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}
.daybar-now-label.is-start { transform: translateX(-8px); }
.daybar-now-label.is-end { transform: translateX(calc(-100% + 8px)); }
.daybar-hours { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.7rem; font-weight: 600; color: var(--label); }
.legend { display: flex; gap: 16px; margin-top: 6px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.legend-major::before { background: var(--gold-deep); }
.legend-minor::before { background: #e6cf87; }

.timeline { position: relative; list-style: none; margin: 16px 0 0; padding: 0; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 28px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.tl-dot { position: relative; z-index: 1; width: 16px; height: 16px; flex-shrink: 0; border-radius: 999px; box-sizing: border-box; }
.tl-dot.is-major { background: var(--gold-deep); box-shadow: 0 0 0 5px rgba(184, 137, 27, 0.16); }
.tl-dot.is-minor { background: #ffffff; border: 3px solid var(--gold-deep); }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-title { font-weight: 800; }
.tl-meta { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.tl-time { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-item.is-earlier { gap: 14px; padding: 6px 0; color: var(--label); font-size: 0.86rem; }
.tl-item.is-earlier .tl-dot { width: 12px; height: 12px; margin-left: 2px; box-shadow: none; }
.tl-item.is-earlier .tl-dot.is-major { background: #b9c1b3; }
.tl-item.is-earlier .tl-dot.is-minor { background: #ffffff; border: 2px solid #b9c1b3; }
.tl-item.is-earlier .tl-time { font-weight: 500; }
.tl-name { flex: 1; min-width: 0; }
.tl-item.is-highlight {
  margin-left: -6px;
  padding: 12px 12px 12px 6px;
  border-radius: 16px;
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.tl-item.is-highlight .tl-dot { box-shadow: 0 0 0 5px rgba(184, 137, 27, 0.18); }
.tl-item.is-now .tl-meta,
.tl-item.is-next .tl-meta { color: var(--gold-text); }
.tl-now { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.tl-now::before { content: ""; width: 16px; height: 2px; flex-shrink: 0; background: var(--gold-deep); }
.tl-now::after { content: ""; flex: 1; height: 1px; background: rgba(184, 137, 27, 0.4); }
.tl-now span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; }

.fc-days h2 { margin-bottom: 6px; }
.day-row {
  display: grid;
  grid-template-columns: 64px 34px minmax(0, 1fr) 34px 58px;
  align-items: center;
  column-gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--soft);
  font-variant-numeric: tabular-nums;
}
.day-row:first-child { border-top: 0; }
.day-row.has-rain { grid-template-columns: 64px 34px minmax(0, 1fr) 34px 58px 62px; }
.day-row.is-today { margin: 0 -10px; padding: 11px 10px; border-radius: 12px; border-top-color: transparent; background: var(--gold-soft); }
.day-row.is-today + .day-row { border-top-color: transparent; }
.day-name { font-weight: 800; white-space: nowrap; }
.day-name small { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.day-lo { text-align: right; color: var(--muted); }
.day-hi { font-weight: 800; }
.day-bar { position: relative; height: 6px; border-radius: 999px; background: var(--soft); }
.day-row.is-today .day-bar { background: #efe5c8; }
.day-bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.day-row.is-today .day-bar span { background: var(--gold-deep); }
.day-wind,
.day-rain { text-align: right; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.days-note { margin-top: 0; padding-top: 8px; border-top: 1px solid var(--soft); }

.fc-friends .section-head { margin-bottom: 10px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #ffffff; border: 1px solid var(--line); border-radius: 16px; }
.feed-body { display: flex; flex-direction: column; min-width: 0; }
.feed-title { font-size: 0.95rem; }
.feed-meta { font-size: 0.82rem; color: var(--muted); }

/* ---- Trip page ---- */
.trip-hero {
  position: relative;
  padding: 12px 18px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.trip-hero-bar { display: flex; align-items: center; justify-content: space-between; }
.hero-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.hero-btn:hover { background: #e3e8de; color: var(--ink); text-decoration: none; }
.trip-hero-text { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.trip-hero-text h1 { margin: 0; font-size: 1.65rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.trip-hero-text p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.trip-hero.has-photo { height: 330px; padding: 0; border: 0; background: #2a3328; color: #ffffff; }
.trip-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: inherit; }
.trip-hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 24, 18, 0.5) 0%, rgba(18, 24, 18, 0) 24%, rgba(18, 24, 18, 0) 38%, rgba(18, 24, 18, 0.88) 78%, rgba(18, 24, 18, 0.94) 100%);
}
.trip-hero.has-photo .trip-hero-bar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 3; }
.trip-hero.has-photo .hero-btn { background: rgba(255, 255, 255, 0.92); }
.trip-hero.has-photo .hero-btn:hover { background: #ffffff; }
.trip-hero.has-photo .trip-hero-text { position: absolute; left: 18px; right: 18px; bottom: 58px; z-index: 2; margin: 0; }
.trip-hero.has-photo .trip-hero-text p { color: #e4e8de; }
.trip-hero.has-photo .chip-tag { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
.trip-hero.has-photo .chip-tag.is-live { background: rgba(157, 203, 134, 0.32); color: #ffffff; }

.trip-summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  margin: -40px 16px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 28px -14px rgba(18, 24, 18, 0.35);
  font-variant-numeric: tabular-nums;
}
.trip-hero:not(.has-photo) + .trip-summary { margin: 12px 0 14px; box-shadow: var(--shadow-card); }
.summary-cell { display: flex; flex-direction: column; align-items: center; padding: 14px 8px; text-align: center; }
.summary-cell + .summary-cell { border-left: 1px solid var(--soft); }
.summary-cell strong { font-size: 1.35rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.summary-cell span { margin-top: 3px; font-size: 0.75rem; font-weight: 700; color: var(--label); }
.summary-score { padding: 10px 8px; }
.summary-score > span:last-child { color: var(--gold-text); }

.trip-notes-card { margin-bottom: 14px; }
.trip-notes-card p { margin: 6px 0 0; }

.trip-catches { display: grid; gap: 10px; margin: 18px 0 14px; }
.trip-catches .section-head { flex-wrap: wrap; margin-bottom: 0; }
.catch-card { display: flex; align-items: flex-start; gap: 14px; padding: 12px; }
.catch-thumb {
  position: relative;
  display: block;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--soft);
}
.catch-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.catch-thumb.is-empty { display: flex; align-items: center; justify-content: center; color: var(--label); }
.thumb-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  background: rgba(18, 24, 18, 0.78);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
}
.catch-info { flex: 1; min-width: 0; }
.catch-info h3 { margin: 2px 0; font-size: 1.06rem; font-weight: 800; letter-spacing: -0.01em; }
.catch-info .meta { margin: 0; font-size: 0.88rem; color: var(--muted); }
.catch-notes { margin: 6px 0 0; font-size: 0.9rem; }
.catch-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.catch-more img { display: block; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }

.trip-cond { margin-bottom: 14px; }
.cond-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 0; }
.cond-grid > div { padding: 10px 0; border-top: 1px solid var(--soft); }
.cond-grid > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--soft); }
.cond-grid dt { font-size: 0.78rem; font-weight: 700; color: var(--label); }
.cond-grid dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cond-grid dd small { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.muted-dd { font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.bite-details { margin-top: 10px; border-radius: 14px; background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
.bite-details > summary { display: flex; align-items: center; gap: 12px; padding: 12px; list-style: none; cursor: pointer; }
.bite-details > summary::-webkit-details-marker { display: none; }
.bite-details-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bite-details-text span { font-size: 0.82rem; font-weight: 600; color: var(--gold-text); }
.chev { flex-shrink: 0; color: var(--muted); transition: transform 0.15s ease; }
details[open] > summary .chev { transform: rotate(180deg); }
.bite-details-body { padding: 0 12px 12px; }
.bite-details-body .daybar { margin-top: 10px; background: #ffffff; }
.window-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.window-list li { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.window-list .tl-time { font-weight: 700; }
.window-list .tl-dot { width: 12px; height: 12px; box-shadow: none; }
.window-name { flex: 1; min-width: 0; }

.list-card { padding: 0; overflow: hidden; }
.list-card > * + * { border-top: 1px solid var(--soft); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; cursor: pointer; }
details.list-details > summary::-webkit-details-marker { display: none; }
.list-form { margin: 0; cursor: default; }
.list-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
.list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-text strong { font-weight: 700; }
.list-text span { font-size: 0.82rem; color: var(--muted); }
.list-action { font-size: 0.88rem; font-weight: 800; color: var(--accent-2); }
.list-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.member-list li { display: flex; align-items: center; gap: 10px; }
.member-list form { margin: 0; }
.member-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; }
.member-name small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.invite-form { display: grid; gap: 10px; }
.invite-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; }
.invite-form legend { margin-bottom: 4px; font-weight: 700; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.photo-tile { position: relative; margin: 0; }
.photo-tile form { margin: 0; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(18, 24, 18, 0.7);
  color: #ffffff;
  font-size: 1rem;
  line-height: 1;
}
.photo-remove:hover { background: var(--bad); color: #ffffff; }
.upload-form,
.end-form { display: grid; gap: 10px; }

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--bottom-nav-h);
  z-index: 18;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: rgba(243, 245, 241, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

dialog.sheet {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(18, 24, 18, 0.5);
}
dialog.sheet::backdrop { background: rgba(18, 24, 18, 0.45); }
.sheet-form { display: grid; gap: 12px; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em; }
.sheet-form .fine-print { margin-top: -6px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---- Desktop layout ---- */
@media (min-width: 1000px) {
  .fc-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "score bite" "score days" "friends days";
    align-items: start;
    gap: 20px;
  }
  .fc-score { grid-area: score; }
  .fc-bite { grid-area: bite; }
  .fc-days { grid-area: days; }
  .fc-friends { grid-area: friends; }
  .place-picker > summary { font-size: 2rem; }
}

@media (min-width: 801px) {
  .action-bar {
    left: auto;
    /* sit in the margin beside the 760px column when there's room */
    right: max(24px, calc((100vw - 760px) / 2 - 220px));
    bottom: 28px;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
  }
  .action-bar .btn-block { width: auto; padding: 0 1.6rem; border-radius: 999px; }
}

/* ---- Phones ---- */
@media (max-width: 800px) {
  .site-header { min-height: 58px; padding: 0 0.85rem; padding-top: env(safe-area-inset-top); gap: 0.6rem; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .brand-text { font-size: 1.02rem; }

  .nav-bottom { background: #ffffff; backdrop-filter: none; }
  .nav-bottom-link { position: relative; border-radius: 0; color: var(--muted); font-weight: 700; }
  .nav-bottom-link:hover { background: var(--soft); color: var(--ink); }
  .nav-bottom-link.active,
  .nav-more summary.nav-bottom-link.active { background: transparent; color: var(--ink); font-weight: 800; }
  .nav-bottom-link.active::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 30%;
    right: 30%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--gold-deep);
  }
  .nav-more-panel { border-radius: 14px; box-shadow: 0 14px 34px -12px rgba(18, 24, 18, 0.35); }
  .nav-more-panel a:hover,
  .nav-more-panel a[aria-current="page"] { background: var(--gold-soft); }
  .nav-more-logout:hover { background: var(--soft); }

  .wrap-wide { width: calc(100% - 2rem); }
  .wrap-trip { width: calc(100% - 2rem); padding-bottom: calc(1.25rem + var(--bottom-nav-h) + 76px); }

  .place-form button { width: auto; }
  .fc-head .icon-btn { width: 44px; }
  .ring-lg { width: 200px; height: 200px; }

  .trip-hero.has-photo { margin: -1rem -1rem 0; height: 320px; border-radius: 0; }
  .trip-hero:not(.has-photo) { margin-top: 0; }

  dialog.sheet {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .sheet-form button.btn-block { width: 100%; }
  .icon-btn,
  .hero-btn { width: 44px; }
  .btn:not(.btn-block) { width: auto; }
  .switch { width: 52px; }
  .photo-remove { width: 28px; }
}

@media (max-width: 560px) {
  .tl-item.is-earlier { font-size: 0.82rem; }
  .tl-item.is-earlier .tl-when { display: none; }
  .tl-item:not(.is-earlier) .tl-time { font-size: 0.95rem; }
  .day-row { grid-template-columns: 52px 30px minmax(0, 1fr) 30px 54px; column-gap: 8px; }
  .day-row.has-rain { grid-template-columns: 52px 30px minmax(0, 1fr) 30px 54px 52px; }
  .day-row .day-wind,
  .day-row .day-rain { font-size: 0.8rem; }
  .card { padding: 1.05rem 1rem 0.95rem; }
}
