/* Waterlog — original light aqua theme: pale blue background, dark teal hero,
   segmented tabs, white cards, rounded Nunito type. */
:root {
  --bg: #e9f3f5;
  --bg-soft: #dcebee;
  --card: #ffffff;
  --ink: #12333d;
  --muted: #66848d;
  --teal: #0f8a9c;
  --teal-bright: #14a3b8;
  --teal-dark: #0b3f4d;
  --teal-deep: #082e39;
  --pill: #d7e9ed;
  --line: #d3e5ea;
  --danger: #d64545;
  --ok: #1d9e6b;
  --radius: 22px;
  --shadow: 0 2px 10px rgba(11, 63, 77, 0.07);
  /* spacing scale (auth pages) */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem;
  --s4: 1rem; --s6: 1.5rem; --s8: 2rem;
  --shadow-lg: 0 16px 44px rgba(8, 46, 57, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  padding-top: env(safe-area-inset-top, 0px);
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- app header --- */
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem 0.4rem;
  max-width: 960px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.logo { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; box-shadow: var(--shadow); }
.wordmark { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.01em; }
.iconbtns { display: flex; align-items: center; gap: 0.6rem; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: none;
  box-shadow: var(--shadow);
  font-size: 1.3rem;
  color: var(--teal-dark);
}
.icon-btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Admin pending-approvals badge on the Reports icon (Oct 2026). */
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.who { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.badge {
  background: var(--teal);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
}
@media (max-width: 560px) {
  .who { display: none; }
  .appbar { gap: 0.5rem; padding: 0.7rem 0.8rem 0.3rem; flex-wrap: wrap; }
  .logo { width: 44px; height: 44px; border-radius: 13px; }
  .wordmark { font-size: 1.25rem; }
  .iconbtns { gap: 0.4rem; }
  .icon-btn { width: 44px; height: 44px; font-size: 1.15rem; }
  .head-add { padding: 0.45rem 0.7rem; font-size: 0.85rem; white-space: nowrap; }
}

/* --- layout --- */
.wrap { max-width: 960px; margin: 0 auto; padding: 0.6rem 1.1rem 2.5rem; }
/* Wider desktop canvas (Oct 2026): room for 3-across catalog cards.
   Scales down gracefully — below 1100px the 960px cap still applies. */
@media (min-width: 1100px) {
  .appbar, .wrap { max-width: 1220px; }
}
@media (min-width: 1600px) {
  .appbar, .wrap { max-width: 1380px; }
}
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 2rem 1rem; }
h1 { font-size: 2rem; margin: 0; font-weight: 800; }
h2 { font-size: 1.25rem; margin: 1.4rem 0 0.6rem; font-weight: 800; }
h3 { margin: 0 0 0.15rem; font-size: 1.08rem; font-weight: 800; }
.muted { color: var(--muted); }
.tiny { font-size: 0.75rem; }
.kicker {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--teal-dark);
  margin: 0 0 0.15rem;
  text-transform: uppercase;
}
.count {
  background: var(--pill);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.15rem 0.7rem;
  vertical-align: middle;
  color: var(--teal-dark);
}

/* --- logged-out welcome --- */
.welcome { text-align: center; max-width: 460px; margin: 2rem auto 1.5rem; }
.welcome-logo {
  width: 120px;
  height: 120px;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.welcome h1 { font-size: 2.4rem; margin: 0.9rem 0 0.5rem; }
.welcome-sub { color: var(--muted); font-size: 1.02rem; line-height: 1.55; margin: 0 0 0.9rem; }

/* --- hero (credits) --- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(150deg, #0e4a5a 0%, var(--teal-deep) 70%);
  color: #fff;
  padding: 1.6rem 1.5rem 5.5rem;
  margin: 0.6rem 0 1rem;
  box-shadow: 0 8px 24px rgba(8, 46, 57, 0.25);
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.hero-body { flex: 1; text-align: center; min-width: 0; }
.hero .kicker { color: #bfe3ea; }
.hero-num { font-size: 5.5rem; font-weight: 800; line-height: 1; margin: 0.4rem 0 0.8rem; }
.hero-sub { color: #cfe8ee; font-size: 1.15rem; margin: 0 0 1rem; }
.hero-pill {
  display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 800;
  color: #eaf6f9;
  background: rgba(255, 255, 255, 0.08);
}
.hero-bar {
  position: relative;
  height: 1.7rem;
  max-width: 430px;
  margin: 0 auto 0.45rem;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
}
.hero-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, #19b3c9, #6fdcf0);
  border-radius: 999px;
}
@media (max-width: 640px) {
  .hero { align-items: center; gap: 0.7rem; padding: 1.3rem 1rem; }
  .hero.hero-compact { flex-direction: row; }
  .hero-mascot-badge { width: 46px; height: 46px; }
  .hero-body { width: 100%; }
  .hero-num { font-size: 3.4rem; margin: 0.2rem 0 0.7rem; }
  .hero-bar { width: 100%; max-width: 300px; }
}

/* --- segmented tabs --- */
.seg {
  display: flex;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 6px;
  gap: 4px;
  margin: 0 0 1.4rem;
}
.seg a {
  flex: 1;
  text-align: center;
  padding: 0.65rem 0.4rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  font-size: 1.02rem;
}
.seg a:hover { text-decoration: none; color: var(--teal-dark); }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.friend-toast {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--teal); border-radius: 999px;
  padding: 0.55rem 0.9rem; margin: 0.7rem 0;
  box-shadow: var(--shadow); font-size: 0.92rem; color: var(--ink);
}
.friend-toast a { font-weight: 700; color: var(--teal-dark); white-space: nowrap; }
.friend-toast-x {
  margin-left: auto; border: none; background: none; color: var(--muted);
  font-size: 1rem; line-height: 1; cursor: pointer; padding: 0.2rem;
}
/* --- what's new card --- */
.whatsnew { border: 1px solid var(--teal); }
.wn-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.wn-x { border: none; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 0.2rem; }
.wn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.wn-list li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; }
.wn-ico { font-size: 1.15rem; line-height: 1.3; }

/* --- section head --- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.4rem 0 1rem; }
.section-head h1 { font-size: 2.1rem; }

/* --- search --- */
.searchbar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.searchbar .searchwrap { position: relative; flex: 1; }
.searchbar .searchwrap .sicon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1.15rem; pointer-events: none;
}
.searchbar input[type="search"] {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 1.02rem;
  font-family: inherit;
  color: var(--ink);
}
.searchbar input[type="search"]:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); }
.searchbar input[type="search"]::placeholder { color: #93a9b0; }

/* --- filter dropdowns --- */
.fgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid label { display: block; font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.fgrid select,
.fgrid input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366848d' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
.fgrid input { background-image: none; }
.fgrid select:focus, .fgrid input:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); }

/* --- filter chips (catalog) --- */
.chips { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.chips a {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}
.chips a:hover { text-decoration: none; color: var(--teal-dark); border-color: var(--teal); }
.chips a.on { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

/* --- unified filter bar (dark teal) --- */
.filterbar {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  align-items: center;
  background: linear-gradient(150deg, #0e4a5a 0%, var(--teal-deep) 75%);
  border-radius: 20px;
  padding: 0.65rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 14px rgba(8, 46, 57, 0.2);
}
.fsearch { position: relative; min-width: 0; }
.fsearch .sicon {
  position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%);
  color: #a9ccd4; font-size: 1.05rem; pointer-events: none;
}
.fsearch input[type="search"] {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.7rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}
.fsearch input[type="search"]::placeholder { color: #a9ccd4; }
.fsearch input[type="search"]:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); background: rgba(255, 255, 255, 0.18); }
.fchip {
  padding: 0.65rem 2.3rem 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.12);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cfe8ee' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fchip:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); }
.fchip option { color: var(--ink); background: #fff; font-weight: 400; }
.fchip.finput { cursor: text; background-image: none; padding-right: 1.1rem; min-width: 130px; }
.fchip.finput::placeholder { color: #a9ccd4; }
@media (max-width: 640px) {
  .filterbar { grid-template-columns: 1fr 1fr; }
  .fsearch { grid-column: 1 / -1; }
}

/* --- cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.ride-top { display: flex; gap: 0.9rem; align-items: flex-start; flex-wrap: wrap; }
.ride-ico {
  width: 58px; height: 58px; flex-shrink: 0;
  border-radius: 50%;
  background: #d9edf1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: inset 0 0 0 2px rgba(20, 163, 184, 0.25);
}
.ride-info { flex: 1 1 200px; min-width: 0; }
.ride-info .park { color: var(--muted); margin: 0; font-size: 1rem; }
.ride-info .sub { color: var(--muted); margin: 0.1rem 0 0; font-size: 0.95rem; }
.ride-actions { display: flex; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.ride-actions form { margin: 0; }
.soakrow { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.soakrow .slabel { font-weight: 800; color: var(--muted); font-size: 0.95rem; white-space: nowrap; flex-shrink: 0; }
.notes { margin: 0.7rem 0 0; font-size: 0.95rem; white-space: pre-wrap; }
.card-tools { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; flex-wrap: wrap; }

.pill {
  background: var(--pill);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--teal-dark);
}
.pill.ok { background: #d7f2e4; color: #14714d; }
.pill.bad { background: #fbe0e0; color: #b33737; }
.pill.done { background: #dde8f5; color: #2c5a8f; }
.pill.rride { background: #e0f2f7; color: #0f6e8c; }
.pill.dry { background: #f0e6d2; color: #8a6d1b; }

/* --- soak droplets --- */
.soak { font-size: 1rem; white-space: nowrap; }
.soak em { font-style: normal; font-size: 0.8rem; color: var(--muted); margin-left: 0.25rem; font-weight: 700; }
/* SVG droplet display (soakDisplay with svg:true): same icon and size as the
   tappable pickers. */
.soak-svg svg { width: 30px; height: 30px; vertical-align: -6px; }
.soak-svg svg path { fill: #14a3b8; }
.soak-none { color: var(--muted); }
/* Two-row soak layout (catalog cards + ride detail): community average on
   top, tappable log-and-rate below. Fixed-width label column so both droplet
   groups start at the same x (lined up, not pushed far right). */
.soak-lines { margin-top: 0.9rem; border-top: 1px solid var(--line); }
.soak-line { padding: 0.7rem 0; }
.soak-line + .soak-line { border-top: 1px solid var(--line); }
.soak-line, .soak-line-form { display: flex; align-items: center; gap: 0.9rem; }
.soak-line-form { width: 100%; margin: 0; }
.soak-line .slabel { flex: 0 0 150px; font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.soak-val { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.soak-val .avg { font-style: normal; font-size: 0.82rem; color: var(--muted); font-weight: 600; text-align: right; }
.soak-lines .soak-svg { display: inline-flex; gap: 2px; line-height: 0; white-space: nowrap; }
.soak-lines .soak-svg svg { width: 22px; height: 22px; margin: 3px; }
/* Average-soak droplets inside the Ridden lap-count pill: text-sized so they
   sit on the line instead of dwarfing it. */
.tag .soak-svg { display: inline-flex; gap: 1px; line-height: 0; white-space: nowrap; }
.tag .soak-svg svg { width: 15px; height: 15px; vertical-align: -2px; }
.soak-lines .soak-scale .drop { padding: 3px; min-width: 0; min-height: 0; }
.soak-lines .soak-scale .drop svg { width: 22px; height: 22px; }
/* Divider above the action buttons on ride cards */
.card.ride .card-tools { border-top: 1px solid var(--line); margin-top: 0; padding-top: 0.9rem; }

.soak-picker { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.soak-picker input { position: absolute; opacity: 0; pointer-events: none; }
.soak-picker label {
  cursor: pointer;
  text-align: center;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  filter: grayscale(1);
  opacity: 0.4;
  transition: all 0.15s ease;
}
.soak-picker label .drop { font-size: 1.7rem; display: block; color: var(--teal); }
.soak-picker label small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 800; }
.soak-picker input:checked + label { filter: none; opacity: 1; border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.soak-picker input:focus-visible + label { outline: 2px solid var(--teal-bright); }

/* Above-the-line meta row on catalog cards: status, year, "In your log" badge */
.ride-info .topmeta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0;
}

/* Soak editor on ridden cards: same droplet look as the catalog scale.
   Filled (<= rating) droplets are solid blue; the rest are light/outlined. */
.soak-inline { display: inline-flex; gap: 2px; margin: 0; }
.soak-inline button {
  background: transparent;
  border: none;
  padding: 7px;
  margin: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
  border-radius: 12px;
}
.soak-inline button svg { width: 30px; height: 30px; }
.soak-inline button svg path {
  fill: rgba(20, 163, 184, 0.10);
  stroke: #9dc4d2;
  stroke-width: 1.8;
}
.soak-inline button.on svg path {
  fill: var(--teal-bright);
  stroke: var(--teal-bright);
}
.soak-inline button:active { transform: scale(1.18); }
.soak-inline button:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }

/* Quick-log soak scale on catalog cards: unified 5-droplet selector.
   DOM order is 5→1 with row-reverse display, so the sibling selector
   fills droplets 1..N when droplet N is hovered, active, or focused. */
.quicklog-row { margin-top: 0.55rem; }
.quicklog-form { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.65rem; }
.quicklog-label { font-size: 0.85rem; font-weight: 800; color: var(--ink); }
.soak-scale { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.soak-scale .drop {
  background: transparent;
  border: none;
  padding: 7px;
  margin: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
  border-radius: 12px;
}
.soak-scale .drop svg { width: 30px; height: 30px; }
.soak-scale .drop svg path {
  fill: rgba(20, 163, 184, 0.10);
  stroke: #9dc4d2;
  stroke-width: 1.8;
  transition: fill 0.12s ease, stroke 0.12s ease;
}
.soak-scale .drop:hover svg path,
.soak-scale .drop:hover ~ .drop svg path,
.soak-scale .drop:active svg path,
.soak-scale .drop:active ~ .drop svg path,
.soak-scale .drop:focus-visible svg path,
.soak-scale .drop:focus-visible ~ .drop svg path {
  fill: var(--teal-bright);
  stroke: var(--teal-bright);
}
.soak-scale .drop:active { transform: scale(1.18); }
.soak-scale .drop:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }

/* --- forms --- */
.form label { display: block; margin-bottom: 0.9rem; font-weight: 800; font-size: 0.95rem; }
.form input[type="text"],
.form input[type="password"],
.form input[type="number"],
.form input[type="date"],
.form input[type="url"],
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}
.form select option { background: #fff; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
@media (max-width: 640px) { .row3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 0.6rem; margin-top: 0.4rem; flex-wrap: wrap; }
.inline-form { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }

/* --- buttons --- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--teal-dark);
  font-size: 0.98rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--teal); }
.btn.primary { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.soft { background: var(--pill); border-color: transparent; color: var(--teal-dark); }
.btn.soft:hover { background: #c6dfe5; }
.btn.ghost { background: transparent; }
.btn.small { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn.tiny { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.btn.danger { border-color: #efb3b3; color: var(--danger); background: transparent; }
.btn.danger:hover { background: #fdeeee; }
.btn.outline { background: transparent; border-color: var(--teal); color: var(--teal-dark); }
.btn.outline:hover { background: #e3f1f5; }
.head-add { white-space: nowrap; }
.tag {
  display: inline-block;
  background: var(--pill);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-dark);
}

/* --- tables --- */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--pill); font-size: 0.85rem; color: var(--teal-dark); font-weight: 800; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f4fafb; }
/* Pagination under the submission-history tables on Reports. */
.page-nav { display: flex; align-items: center; gap: 0.75rem; margin: 0.6rem 0 1.4rem; }
.page-nav .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
/* Users admin table: role badge + action share one cell. */
.role-cell { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.role-cell form { margin: 0; }
/* Phone tables: keep every table inside the viewport — no horizontal scroll. */
@media (max-width: 560px) {
  .table { font-size: 0.85rem; width: 100%; }
  .table th, .table td { padding: 0.5rem 0.55rem; }
  .table .col-filed { display: none; }
  .table .col-joined { display: none; } /* Users admin table: hide Joined on phones */
  .table .col-reviews, .table .col-photos { display: none; } /* Users admin: keep User/Role/Rides only */
  .role-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .role-cell .btn { white-space: nowrap; }
  /* App header: logo alone fits 360px phones; the wordmark returns on wider screens.
     Scoped to .appbar so the login hero wordmark still shows on mobile. */
  .appbar .wordmark { display: none; }
  .table td { overflow-wrap: break-word; }
  /* Tappable soak buttons shrink to fit the 3-column Ride/Park/Soak tables. */
  .soak-inline { gap: 1px; }
  .soak-inline button { min-width: 30px; min-height: 30px; padding: 2px; }
  .soak-inline button svg { width: 20px; height: 20px; }
  /* Tab bar labels fit 360px phones. */
  .seg a { font-size: 0.85rem; padding: 0.6rem 0.2rem; }
  /* Grid cards must shrink below content width on narrow phones. */
  .bd-hero-grid > * { min-width: 0; }
  /* Soak-line labels shrink so droplets fit on narrow phones. */
  .soak-line .slabel { flex-basis: 100px; font-size: 0.85rem; }
  .soak-line { gap: 0.6rem; }
}
.table .num, .table .rank { text-align: right; }
.table .rank { width: 3rem; color: var(--muted); }
.table .soak { font-size: 0.85rem; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.table .soak em { margin-left: 0; font-size: 0.72rem; }
/* Drill-down tables: droplets stay on one inline row — the profile-table
   stacking above must never leak in here (Oct 2026 regression). Higher
   specificity beats .table .soak regardless of rule order. */
.table.drill-table .soak { display: inline; }

/* --- breakdown --- */
.bd-hero { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 1.1rem; }
.donut-wrap {
  position: relative; width: 108px; height: 108px; flex-shrink: 0;
}
.donut { width: 108px; height: 108px; display: block; }
.donut-seg { cursor: pointer; transition: stroke-width 0.15s ease; }
.donut-seg.active { stroke-width: 27; }
.ring-hole {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; overflow: hidden;
}
.donut-hint {
  margin: 0.3rem 0 0; font-size: 0.7rem; color: var(--muted);
  text-align: center;
}
.hole-icon { font-size: 1.25rem; line-height: 1.2; }
.hole-name { font-size: 0.6rem; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.2; padding: 0 6px; }
.hole-num { font-size: 0.95rem; font-weight: 800; color: var(--teal-dark); line-height: 1.2; }
.hero-num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.hero-lbl { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; }
/* Breakdown hero redesign (Kevin's mockup): progress card + metrics card + alert banner */
.bd-hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .bd-hero-grid { grid-template-columns: 1fr; } }
.progress-card, .metrics-card { border: 2px solid #d4a017; }
.card-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 0 0 0.8rem; }
.progress-top { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.donut-legend { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.legend-item:hover { text-decoration: underline; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.goal-bar { margin: 0.5rem 0; }
.goal-track { position: relative; height: 14px; background: #d7e9ed; border-radius: 7px; overflow: visible; }
.goal-fill { position: relative; height: 100%; background: linear-gradient(90deg, #14a3b8, #d4a017); border-radius: 7px; min-width: 30px; }
.goal-badge { position: absolute; right: -14px; top: -22px; background: var(--teal-dark); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 8px; }
.goal-badge::after { content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--teal-dark); border-bottom: none; }
.goal-end { text-align: right; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 0.3rem; }
.goal-text { margin: 0.5rem 0 0; font-size: 0.95rem; }
.metric-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.metric-tile { background: #eef6f8; border-radius: 12px; padding: 0.8rem 0.5rem; text-align: center; }
.metric-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.metric-icon img { border-radius: 50%; }
.empty-state { text-align: center; padding: 2rem 1rem; }
.empty-state img { border-radius: 50%; margin-bottom: 1rem; }
.metric-num { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.metric-lbl { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-top: 0.2rem; }
.alert-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; border: 2px solid #d64545; border-radius: 16px; padding: 0.9rem 1.2rem; margin-bottom: 1rem; text-decoration: none; color: var(--ink); }
.alert-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }
.alert-cta { font-weight: 800; font-size: 0.9rem; white-space: nowrap; color: var(--ink); }
/* Staging environment indicator: only rendered when APP_ENV=staging */
.staging-banner {
  background: #f7b500; color: #1a1a1a;
  border-top: 3px solid #1a1a1a; border-bottom: 3px solid #1a1a1a;
  font-weight: 800; font-size: 0.85rem; text-align: center;
  padding: 0.45rem 0.8rem; letter-spacing: 0.04em;
}
.bd-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.bd-stats div { display: flex; flex-direction: column; }
.bd-stats b { font-size: 1.4rem; color: var(--teal-dark); }
.bd-stats span { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.brow {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.brow:last-child { border-bottom: none; }
.brow:hover { text-decoration: none; background: #f4fafb; border-radius: 8px; }
.brow-label { flex: 0 1 220px; font-weight: 800; }
/* Soak-rating rows: fixed-width droplet + name columns so every row's label,
   bar, and count start at the same x — no wrapping, no drift. Each droplet
   gets its own 1.3em cell, so five droplets are exactly 6.5em on any phone;
   flex items can't wrap or overlap, no matter how wide the emoji renders. */
.soak-drops { display: inline-flex; width: 6.5em; margin-right: 0.45rem; }
.soak-drops i { flex: 0 0 1.3em; font-style: normal; text-align: center; }
.soak-name { display: inline-block; min-width: 5rem; white-space: nowrap; }
.brow-label em { font-style: normal; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.bar { flex: 1; height: 10px; background: var(--pill); border-radius: 6px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); border-radius: 6px; }
.brow-count { margin-left: auto; min-width: 5.2rem; text-align: right; color: var(--teal-dark); font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.brow-num { display: inline-block; min-width: 2.2ch; text-align: right; }

/* --- Breakdown: two-column, show more --- */
.bd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) {
  .bd-two-col { grid-template-columns: 1fr; }
  .brow-label { flex: 0 1 auto; min-width: 0; }
}

.show-more-btn { display: block; width: 100%; margin-top: 0.5rem; padding: 0.6rem; background: none; border: 1px dashed var(--line); border-radius: 8px; color: var(--teal-dark); font-weight: 700; cursor: pointer; }
.show-more-btn:hover { background: #f4fafb; }

/* Active filter results callout */
.filter-callout { background: #f1f8fa; border-left: 4px solid var(--teal); }
.filter-callout .soak-cell { white-space: nowrap; }
/* Drill-down tables: droplet ratings must never wrap mid-cell. */
.soak-cell { white-space: nowrap; }
/* Highlight the currently active filter row */
.brow.filter-active { background: #e8f4f7; border-radius: 8px; }

/* Active filter chips */
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0 0 0.6rem; }
.filter-chips[hidden] { display: none; }
.flt-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #e8f4f7; border: 1px solid #bfe3ec; border-radius: 999px;
  padding: 0.28rem 0.35rem 0.28rem 0.7rem; font-size: 0.85rem; line-height: 1.2;
  color: #1d5b6b; flex: 0 0 auto;
}
.flt-chip-kind { color: #5b7a85; font-weight: 600; }
.flt-chip-x {
  border: none; background: #c8e6ee; color: #1d5b6b; border-radius: 50%;
  width: 1.25rem; height: 1.25rem; font-size: 0.95rem; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  flex: 0 0 auto;
}
.flt-chip-x:hover { background: #a9d8e4; }
.flt-clear {
  border: none; background: none; color: var(--teal); font-size: 0.85rem; font-weight: 700;
  cursor: pointer; padding: 0.28rem 0.4rem; text-decoration: underline;
}

/* --- misc --- */
.alert {
  background: #fdeeee;
  border: 1.5px solid #efb3b3;
  color: #b33737;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 700;
}
.alert.ok { background: #e2f6ec; border-color: #9fdcbb; color: #14714d; }
code { background: var(--pill); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9em; }
code.big { font-size: 1.3rem; letter-spacing: 0.1em; padding: 0.4rem 0.8rem; }

.ptabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ptabs a { padding: 0.5rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted); font-weight: 800; background: var(--card); }
.ptabs a:hover { text-decoration: none; color: var(--teal-dark); }
.ptabs a.on { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

.queue-item { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.queue-detail p { margin: 0.4rem 0 0; }
.queue-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.queue-actions form { margin: 0; }
/* Submission-status toast on the homepage (Oct 2026). */
.notif-banner { border-left: 4px solid var(--accent, #0ea5e9); margin-bottom: 1rem; }
.notif-row { display: flex; gap: 0.5rem; align-items: center; padding: 0.3rem 0; }
.notif-ico { font-size: 1.1rem; }
.notif-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.notif-actions form { margin: 0; }

hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.ridden-stat { margin: 0.2rem 0 1rem; font-size: 1.05rem; }
.login-wrap { max-width: 420px; margin: 3rem auto; }
.login-wrap .logo { width: 72px; height: 72px; border-radius: 20px; }

/* Toast notifications (offline outbox + sync feedback) */
#toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  width: min(92vw, 26rem);
  pointer-events: none;
}
.toast {
  background: #0d4552;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(7, 60, 72, 0.35);
  text-align: center;
  animation: toast-in 0.25s ease-out;
}
.toast.err { background: #b23a2e; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.35s; }
/* Tortron easter egg: 5 quick footer taps summon the secret cat. */
#tortron-egg {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 1rem calc(1.5rem + env(safe-area-inset-bottom));
  background: rgba(8, 46, 57, 0.45);
  opacity: 0; transition: opacity 0.25s ease-out;
}
#tortron-egg.in { opacity: 1; }
.tortron-card {
  background: var(--card); color: var(--ink);
  border-radius: 20px; padding: 1.2rem 1.4rem 1.1rem;
  max-width: 320px; text-align: center;
  box-shadow: 0 18px 48px rgba(7, 60, 72, 0.45);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
#tortron-egg.in .tortron-card { transform: none; }
.tortron-card img { border-radius: 50%; background: #fff; }
.tortron-line { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.45; }
.tortron-close { margin-top: 0.8rem; }
@media (prefers-reduced-motion: reduce) {
  #tortron-egg, .tortron-card { transition: none; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- welcome hero (logged-out pages) --- */
.welcome-mascot {
  width: 210px;
  max-width: 55vw;
  height: auto;
  border-radius: 26px;
}
.welcome-feats {
  list-style: none;
  padding: 0;
  margin: 0 auto 1rem;
  max-width: 430px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.2rem;
  text-align: left;
}
.welcome-feats li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: var(--ink);
  font-size: 0.98rem;
}
.pill.gold { background: #f4e4b8; color: #7a5f14; }

/* --- login / reset cards --- */
.login-card h3 { margin: 0 0 1rem; font-size: 1.15rem; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }
@media (max-width: 560px) { .frow { grid-template-columns: 1fr; } }
.forgot { text-align: right; margin: 0 0 0.9rem; font-size: 0.9rem; }
.btn.big { width: 100%; padding: 0.85rem 1.15rem; font-size: 1.05rem; }
.center { text-align: center; }
.upper { text-transform: uppercase; }

/* Milestone celebration overlay (every 50 water ride credits). */
.milestone-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(11, 63, 77, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: milestone-in 0.3s ease-out;
}
.milestone-overlay.out { opacity: 0; transition: opacity 0.3s; }
.milestone-card {
  background: #fff;
  border-radius: 1.25rem;
  text-align: center;
  padding: 2rem 2.5rem;
  max-width: 22rem;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  animation: milestone-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.milestone-emoji { font-size: 2.5rem; }
.milestone-num {
  font-size: 4rem;
  font-weight: 900;
  color: #b8860b;
  line-height: 1;
}
.milestone-lbl {
  font-weight: 800;
  color: #0d4552;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.75rem;
}
@keyframes milestone-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes milestone-pop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: none; }
}

/* --- breakdown jazz --- */
.bd-hero { flex-direction: column; align-items: stretch; }
.bd-hero-top { display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; }
.bd-ring-col { display: flex; flex-direction: column; align-items: center; }
.bd-stats { display: flex; gap: 0.75rem; flex-wrap: wrap; flex: 1; justify-content: space-around; }
.ms-progress { margin-top: 1.1rem; }
.ms-track { height: 0.6rem; background: #dcebee; border-radius: 999px; overflow: hidden; }
.ms-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-bright), #b8860b); border-radius: 999px; }
.ms-progress p { margin: 0.45rem 0 0; font-size: 0.88rem; }
.ms-progress p b { color: var(--teal-dark); }
.nudge {
  display: flex; align-items: center; gap: 0.6rem;
  border-left: 4px solid #b8860b;
  text-decoration: none; color: inherit; font-size: 0.95rem;
}
.nudge b { color: var(--teal-dark); }
.nudge-go { margin-left: auto; font-weight: 900; color: var(--teal-dark); font-size: 1.2rem; }
.fun-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.fun-tile { text-align: center; padding: 1rem 0.75rem; margin-bottom: 0; }
.fun-emoji { font-size: 1.6rem; }
.fun-tile b { display: block; margin: 0.35rem 0 0.15rem; color: var(--teal-dark); font-size: 0.95rem; }
.fun-tile span { font-size: 0.78rem; color: var(--muted); font-weight: 700; }

/* --- ride photos (v1) --- */
.ride-photo-banner {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 0.9rem;
  aspect-ratio: 16 / 9;
  position: relative;
}
.ride-photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Ride detail hero only: the whole photo is visible (contain), centered on a
   dark backdrop matching the gallery lightbox. Cards keep 16:9 cover. */
.ride-photo-banner--detail {
  aspect-ratio: auto;
  background: #0b242e;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.ride-photo-banner--detail img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}
/* Count badge: lighter glass pill so it pops on the dark backdrop. */
.ride-photo-banner--detail .photo-count { background: rgba(255, 255, 255, 0.18); }
.photo-count {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
}
/* Empty photo slot on the ride detail page: compact dashed CTA pill.
   Lives inside the white ride card, so it uses dark-teal text/border. */
.ride-photo-empty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 2px dashed #9dc4d2;
  background: #eef6f8;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.ride-photo-empty span:first-child { font-size: 1.2rem; }
.photo-mini {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.photo-queue-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}
.photo-queue-item { align-items: center; }
.photo-queue-item .queue-actions { flex-direction: column; align-items: stretch; }
.photo-preview img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.5rem 0;
}
.checkline {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 600;
}
.checkline input {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

/* --- gallery lightbox --- */
.gallery { position: fixed; inset: 0; z-index: 100; }
.gallery[hidden] { display: none; }
.g-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 26, 0.9);
}
.g-box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 0.75rem 1.25rem;
  pointer-events: none;
}
.g-box > * { pointer-events: auto; }
.g-trackwrap {
  width: min(94vw, 900px);
  overflow: hidden;
  border-radius: 12px;
  touch-action: pan-y;
}
.g-track { display: flex; transition: transform 0.25s ease; }
.g-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a141a;
}
.g-slide img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
}
.g-close,
.g-arrow {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.4rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.g-close { top: 0.7rem; right: 0.7rem; }
.g-arrow { top: 42%; }
.g-prev { left: 0.4rem; }
.g-next { right: 0.4rem; }
.g-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.g-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.g-dot.on { background: #fff; }
.g-cap {
  color: #fff;
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
  text-align: center;
}
.g-tools { margin-top: 0.7rem; }
.g-tools .btn { background: rgba(255, 255, 255, 0.14); color: #fff; border: 0; }

/* --- home page --- */
.hero-compact { padding: 1rem 1.3rem; }
.hero-mascot-badge {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.hero-compact .hero-num { font-size: 2.6rem; margin: 0; flex-shrink: 0; }
.hero-compact .hero-body { text-align: left; }
.hero-compact .hero-bar { height: 0.8rem; margin: 0.45rem 0 0.35rem; }
.hero-compact .hero-togo { margin: 0; color: #cfe8ee; font-size: 0.92rem; font-weight: 700; }
.hero-compact .hero-togo b { color: #fff; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0.7rem; }
.section-bar h2 { margin: 0; font-size: 1.25rem; }
.fresh-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--card); border-radius: 16px; padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem; box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
}
.fresh-row:hover { background: #f4fafb; }
.fresh-ico {
  width: 42px; height: 42px; border-radius: 50%; background: var(--pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.fresh-info { flex: 1; min-width: 0; }
.fresh-info b { display: block; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fresh-info span { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.pill.fresh-new { background: var(--teal-dark); color: #fff; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; }

/* --- featured (home page "ride of the day") card variant --- */
.card.ride.featured { position: relative; border: 2px solid #e8b93c; box-shadow: 0 4px 18px rgba(232, 185, 60, 0.28); }
/* Stacked soak line on the featured card: label on its own line, value beneath. */
.soakrow.stacked { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.soakrow.stacked .slabel { white-space: normal; }
/* Stronger tap affordance for the quick-log droplets on the featured card:
   pill container + darker unfilled stroke. Interaction unchanged. */
.card.featured .soak-scale { background: #eaf4f7; border: 1px solid #bcd9e2; border-radius: 14px; padding: 2px 8px; }
.card.featured .soak-scale .drop svg path { stroke: #5b97ab; }
/* Quiet secondary link row (Google / Report) under the primary actions. */
.card-links { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; font-size: 0.85rem; flex-wrap: wrap; }
.card-links a { color: var(--muted); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.card-links .link-sep { color: var(--line); }

/* --- Social v1 (friends + reviews) --- */
.ride-info h3 a { color: inherit; text-decoration: none; }
.ride-info h3 a:hover { text-decoration: underline; }
.friend-cta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.friend-cta form { margin: 0; }
.friend-reqs h3 { margin: 0 0 0.6rem; }
.friend-req { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.5rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.friend-req:first-of-type { border-top: none; }
.friend-req-actions { display: flex; gap: 0.5rem; }
.friend-req-actions form { margin: 0; }
.review-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.review-text { margin: 0.2rem 0 0.6rem; white-space: pre-wrap; }
.review-actions { display: flex; gap: 0.5rem; }
.review-actions form { margin: 0; }

/* Breakdown hero: two columns on desktop, stacked on mobile */
@media (min-width: 641px) {
  .bd-hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
  .bd-hero-row .hero { margin-bottom: 0; }
  .bd-hero-row .card { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .bd-hero-row > * { margin-bottom: 1rem; }
}

/* Profile page: stat badges, reviews, photo grid */
.profile-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.6rem 0 1.2rem; }
.stat-badge { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--card, #fff);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.stat-badge b { font-size: 1rem; }
.review-excerpt { max-width: 28rem; font-size: 0.9rem; }
.review-excerpt a { color: inherit; }
.profile-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.7rem; margin-bottom: 1.2rem; }
.profile-photo { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.profile-photo img { width: 100%; height: 110px; object-fit: cover; display: block; }
.profile-photo-label { display: block; font-size: 0.75rem; padding: 0.3rem 0.45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Activity feed (Home) + Most active board (Leaders) */
.activity-feed { padding: 0; }
.act-row { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: none; }
.act-ico { font-size: 1.25rem; line-height: 1.4; flex: 0 0 auto; }
.act-info { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; min-width: 0; }
.act-info .act-time { color: var(--muted); font-size: 0.75rem; }
.act-info .act-quote { color: var(--teal-dark); font-style: italic; font-size: 0.82rem; }
.leader-sub { color: var(--muted); font-size: 0.8rem; margin: 0.15rem 0 0; }

/* Leaderboard filter controls: segmented board switch + compact dropdowns.
   (Scoped to .boardseg — the main tab bar also uses .seg and must not change.) */
.boardseg { display: flex; background: #dcebf0; border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 0.8rem; }
.boardseg a { flex: 1; text-align: center; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 800; color: #5b7a83; text-decoration: none; font-size: 0.95rem; }
.boardseg a.on { background: var(--teal-dark); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.board-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.fselect { appearance: none; -webkit-appearance: none; border: 1.5px solid var(--line); background-color: var(--card); border-radius: 999px; padding: 0.4rem 1.9rem 0.4rem 0.85rem; font-weight: 700; color: var(--teal-dark); font-size: 0.82rem; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%230b3f4d" stroke-width="1.6" fill="none" stroke-linecap="round"/></svg>'); background-repeat: no-repeat; background-position: right 0.7rem center; }

/* Profile credits pager: compact pill links */
.pager { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 0.7rem 0 1.4rem; }
.pg-num, .pg-nav { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; font-weight: 700; color: var(--teal-dark); text-decoration: none; }
.pg-cur { background: var(--teal-dark); color: #fff; border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; font-weight: 800; }
.pg-nav.off { opacity: 0.35; }
.pg-gap { color: var(--muted); }
.pg-nums { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pg-compact { display: none; font-size: 0.85rem; font-weight: 700; color: var(--muted); padding: 0 0.2rem; }
/* Phones: collapse the numbered links to "4 of 7" so Prev and Next stay on one line. */
@media (max-width: 560px) {
  .pg-nums { display: none; }
  .pg-compact { display: inline; }
  .pager { flex-wrap: nowrap; }
}

/* Park-day batch logging: park picker, checklist, sticky submit bar. */
.park-pick-list { display: grid; gap: 0.6rem; margin-top: 1rem; }
.park-pick {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0.9rem 1.1rem; text-decoration: none; color: inherit;
}
.park-pick:hover { background: #f4fafb; }
.parkday-list { display: grid; gap: 0.5rem; margin: 1rem 0 6rem; }
.parkday-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0.7rem 0.9rem; cursor: pointer;
}
.parkday-row.is-logged { cursor: default; opacity: 0.85; }
.parkday-check { width: 1.4rem; height: 1.4rem; flex: none; accent-color: var(--teal); }
.parkday-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.parkday-info .tiny { overflow-wrap: break-word; }
.parkday-row select { flex: none; max-width: 11rem; }
.parkday-info .pill.rride { margin-top: 0.3rem; align-self: flex-start; }
/* Park-day droplet picker: compact, wraps to its own line on narrow screens. */
.parkday-soak { flex: 1 1 14rem; min-width: 0; }
.parkday-soak .soak-picker { margin-top: 0; gap: 0.35rem; }
.parkday-soak .soak-picker label { padding: 0.4rem 0.5rem; }
.parkday-soak .soak-picker label .drop { font-size: 1.35rem; }
.parkday-soak .soak-picker label small { font-size: 0.6rem; }
/* Park-day form controls: themed to match the app (native controls looked out of place). */
.parkday-row select,
.form-row input[type="date"],
.inline-form input[type="search"] {
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background-color: var(--card);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
}
.parkday-row select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366848d' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  cursor: pointer;
}
.parkday-row select option { background: #fff; }
.parkday-row select:focus,
.form-row input[type="date"]:focus,
.inline-form input[type="search"]:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); }
.inline-form input[type="search"] { border-radius: 999px; padding: 0.7rem 1.1rem; }
.inline-form input[type="search"]::placeholder { color: #93a9b0; }
.form-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; }
.select-all { flex-direction: row !important; align-items: center; cursor: pointer; }
.parkday-bar {
  position: sticky; bottom: 0; z-index: 20;
  padding: 0.8rem 0 calc(0.8rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%);
}
.done-hero { text-align: center; padding: 2.5rem 1.5rem; }
.done-emoji { font-size: 3rem; }
@media (max-width: 560px) {
  .parkday-row { gap: 0.6rem; padding: 0.6rem 0.7rem; }
  .parkday-row select { max-width: 8.5rem; font-size: 0.85rem; }
}

/* --- Re-rides / multiple laps (Oct 2026) ------------------------------------ */
/* Park-day lap stepper: −/+ buttons and number input, 44px touch targets. */
.parkday-main { display: flex; align-items: center; gap: 0.8rem; flex: 1 1 12rem; min-width: 0; }
.parkday-row { flex-wrap: wrap; }
.stepper { display: flex; flex-basis: 100%; align-items: center; gap: 0.55rem; padding-top: 0.55rem; border-top: 1px dashed var(--line, #dfe7ea); }
.stepper[hidden] { display: none; }
.stepper .slabel { font-size: 0.85rem; color: var(--muted, #5c6b73); }
.step-btn { min-width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; border-radius: 12px; border: 1px solid var(--line, #dfe7ea); background: #fff; color: var(--ink, #1d3557); }
.step-num { width: 3.6rem; height: 44px; text-align: center; font-size: 1.1rem; border: 1px solid var(--line, #dfe7ea); border-radius: 12px; background: #fff; color: var(--ink, #1d3557); }
.step-hint { flex-basis: 100%; }
/* Ridden cards: lap pill + re-ride action line. */
.card-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; align-items: center; }
.pill.laps { background: #e3f4fd; color: #0b6fa4; }
/* Ride detail: "Your laps" month groups. */
.lap-month { margin: 1rem 0 0.45rem; font-size: 1rem; }
.lap-when { font-weight: 600; min-width: 7rem; }
.lap-list { display: grid; gap: 0.4rem; margin-bottom: 0.6rem; }
/* Lap history pager (ride detail): Newer/Older across 10-lap pages. */
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.2rem 0 0.5rem; }
.lap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; background: var(--card, #fff); border-radius: var(--radius, 14px); box-shadow: var(--shadow); padding: 0.55rem 0.75rem; }
.lap-time { font-weight: 600; min-width: 4.5rem; }
.lap-actions { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }
.lap-actions form { margin: 0; }
/* 44px touch targets on the per-lap Edit/Delete buttons. */
.lap-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
/* Re-ride buttons are primary actions — 44px tap targets. */
.reride-btn { min-height: 44px; display: inline-flex; align-items: center; }
/* Ride detail: "🏆 Most laps" board. */
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.board-list li { display: flex; align-items: center; gap: 0.7rem; }
.board-list li.me { font-weight: 600; }
.board-list .rank { min-width: 2.2rem; text-align: center; font-weight: 700; }
/* Breakdown: secondary total-laps line under the credit hero. */
.hero-laps { margin: 0.15rem 0 0.45rem; font-size: 0.95rem; }
.hero-dry { margin: 0.1rem 0 0.15rem; color: #8a6d1b; font-size: 0.95rem; font-weight: 600; }
@media (max-width: 560px) {
  .lap-actions { margin-left: 0; }
}
/* Ride detail: "Log past laps" custom-entry form (backfill N laps on a past date). */
/* Action row: total-laps stat badge + one-tap quick log + custom entry (Oct 2026 UX rework). */
.lap-action-grid { display: flex; gap: 0.6rem; align-items: stretch; margin-bottom: 0.9rem; flex-wrap: wrap; }
.lap-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5.2rem; padding: 0.45rem 0.8rem; background: var(--card, #fff); border: 1.5px solid var(--line, #dfe7ea); border-radius: 14px; }
.lap-stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--ink, #1d3557); }
.lap-stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, #5c6b73); }
.lap-action-grid .btn { min-height: 44px; }
.lap-action-grid .lap-quick-form { margin: 0; display: flex; flex: 1 1 10rem; max-width: 22rem; }
.lap-action-grid .lap-quick-form .btn { flex: 1; min-height: 48px; }
.lap-action-grid #past-laps-toggle { flex: 1 1 10rem; max-width: 22rem; border-width: 2px; }
/* Mobile: badge + primary share a row, secondary goes full-width below. */
@media (max-width: 520px) {
  .lap-action-grid { gap: 0.5rem; }
  .lap-stat { min-width: 4.6rem; padding: 0.4rem 0.6rem; flex: 0 0 auto; }
  .lap-action-grid .lap-quick-form { flex: 1 1 auto; max-width: none; }
  .lap-action-grid #past-laps-toggle { flex: 1 1 100%; max-width: none; }
}
#past-laps-toggle.active { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.soak-you { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
/* Toggle panel for the custom-entry form. */
.past-laps-panel { margin-bottom: 0.9rem; }
.past-laps-panel[hidden] { display: none; }
.past-laps-form { background: var(--card, #fff); border-radius: var(--radius, 14px); box-shadow: var(--shadow); padding: 0.8rem 1rem; margin-top: 0.4rem; }
.pl-heading { margin: 0 0 0.6rem; font-size: 1.05rem; }
.past-laps-form input[type="date"] { padding: 0.7rem 0.85rem; border-radius: 14px; border: 1.5px solid var(--line, #dfe7ea); background: var(--card, #fff); color: var(--ink, #1d3557); font-size: 1rem; font-family: inherit; min-height: 44px; width: 100%; }
.past-laps-form input[type="date"]:disabled { opacity: 0.4; }
.check-wrap { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-size: 0.95rem; cursor: pointer; }
.check-wrap input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--teal); }
/* Three-column desktop grid: Date / Laps / Soak; actions span the bottom row. */
.pl-grid { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0.65rem 1.75rem; align-items: start; }
.pl-col { display: grid; gap: 0.35rem; align-content: start; }
.pl-title { font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.pl-title .tiny { font-weight: 400; }
.pl-actions { grid-column: 1 / -1; justify-self: end; align-self: center; display: flex; align-items: center; gap: 1rem; margin-top: 0.3rem; }
.past-laps-form .stepper { flex-basis: auto; border-top: 0; padding-top: 0; }
.past-laps-form .btn { min-height: 44px; }
.past-laps-form .soak-picker { margin-top: 0; }
.linklike { background: none; border: 0; color: var(--muted, #66848d); text-decoration: underline; font-size: 0.95rem; font-family: inherit; min-height: 44px; padding: 0.4rem 0.2rem; cursor: pointer; }
@media (max-width: 620px) {
  .pl-grid { grid-template-columns: 1fr; }
  .pl-actions { justify-self: start; }
  .pl-date input[type="date"] { max-width: 12rem; }
}

/* --- jazzed-up auth pages (login / register / forgot PIN), Oct 2026 ---
   Full-bleed dark hero, brand lockup, feature strip, centered sign-in card.
   Scoped to body.auth so the light app UI is untouched. */
body.auth { background: var(--teal-deep); color: #fff; overflow-x: hidden; }
.auth-hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  background: linear-gradient(180deg, #082e39 0%, #0b3f4d 30%, #0e6b7a 62%, #8fd0d8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s4) 0 var(--s8);
}
/* CSS-only water decorations */
.auth-hero .decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-hero .decor span { position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.55), rgba(255,255,255,0.05) 70%);
  animation: drift 9s ease-in-out infinite alternate; }
.auth-hero .decor .b1 { width: 90px; height: 90px; left: 6%; top: 12%; opacity: 0.5; }
.auth-hero .decor .b2 { width: 34px; height: 34px; left: 14%; top: 58%; opacity: 0.45; animation-duration: 7s; }
.auth-hero .decor .b3 { width: 130px; height: 130px; right: 8%; top: 8%; opacity: 0.35; animation-duration: 11s; }
.auth-hero .decor .b4 { width: 26px; height: 26px; right: 18%; top: 46%; opacity: 0.5; animation-duration: 6s; }
.auth-hero .decor .b5 { width: 60px; height: 60px; left: 10%; bottom: 10%; opacity: 0.3; animation-duration: 10s; }
.auth-hero .decor .b6 { width: 44px; height: 44px; right: 10%; bottom: 22%; opacity: 0.35; animation-duration: 8s; }
.auth-hero .decor .ring { border: 2px solid rgba(255,255,255,0.16); background: none; filter: none; animation: none; }
.auth-hero .decor .r1 { width: 340px; height: 120px; left: -110px; bottom: 6%; }
.auth-hero .decor .r2 { width: 420px; height: 150px; right: -140px; bottom: 2%; }
@keyframes drift {
  from { transform: translateY(-14px); }
  to { transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-hero .decor span { animation: none; }
}
/* Brand lockup (scoped: .brand/.wordmark also style the appbar) */
.auth-hero .brand {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.mascot-badge {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 0 6px rgba(20,163,184,0.16), 0 0 38px rgba(20,163,184,0.55), 0 12px 28px rgba(0,0,0,0.28);
}
.mascot-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-hero .wordmark { margin: var(--s2) 0 var(--s1); font-size: 1.8rem; line-height: 1.15; font-weight: 800; letter-spacing: 0.02em; color: #fff; text-shadow: 0 2px 18px rgba(8,46,57,0.45); }
.tagline { margin: 0; font-size: 0.85rem; line-height: 1.4; font-weight: 700; color: rgba(255,255,255,0.85); }
.beta-pill {
  margin: var(--s3) 0 0;
  background: #f4e4b8; color: #7a5f14;
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 1rem; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(8,46,57,0.25);
  position: relative;
}
/* Feature card strip (login only): 4-up centered grid on desktop, swipeable strip on phones */
.strip-wrap { width: 100%; margin-top: var(--s4); }
.strip {
  display: flex; gap: 0.9rem;
  overflow-x: auto; overflow-y: hidden;
  padding: 0.4rem 1rem 0.6rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}
.strip::-webkit-scrollbar { display: none; }
.feat {
  scroll-snap-align: start;
  flex: 0 0 184px;
  background: var(--card); color: var(--ink);
  border-radius: 18px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 10px 26px rgba(8,46,57,0.22);
  text-align: center;
}
.feat .ico { font-size: 1.5rem; line-height: 1; }
.feat .ico img { width: 56px; height: 56px; object-fit: contain; }
.feat h3 { margin: 0.35rem 0 0.2rem; font-size: 0.9rem; line-height: 1.3; font-weight: 800; letter-spacing: 0.015em; }
.feat p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
@media (min-width: 840px) {
  .strip-wrap { width: auto; max-width: 100%; }
  .strip {
    display: grid;
    grid-template-columns: repeat(4, 184px);
    justify-content: center;
    gap: 0.9rem;
    overflow: visible;
    padding: 0.4rem 1rem 0.6rem;
    scroll-snap-type: none;
  }
  .feat { scroll-snap-align: none; }
}
/* Sign-in card */
.signin {
  position: relative;
  width: min(440px, calc(100% - 2rem));
  background: var(--card); color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(8,46,57,0.32);
  padding: 1.25rem 1.5rem 1.15rem;
  margin-top: var(--s4);
}
.signin h2 { margin: 0 0 1rem; font-size: 1.25rem; line-height: 1.3; font-weight: 800; letter-spacing: 0.02em; text-align: center; }
.signin label { display: block; font-weight: 800; font-size: 0.92rem; margin-bottom: 0.9rem; color: var(--ink); }
.signin input {
  display: block; width: 100%;
  margin-top: 0.35rem; padding: 0.8rem 0.9rem;
  border-radius: 14px; border: 1.5px solid var(--line);
  background: #f2f8f9; color: var(--ink);
  font: inherit; font-size: 1rem; min-height: 48px;
}
.signin input:focus { outline: 2px solid var(--teal-bright); border-color: var(--teal-bright); background: #fff; }
.signin .frow { margin-bottom: 0; }
.signin .forgot { margin: 0 0 1rem; }
.signin .hint { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin: 0 0 1rem; }
.btn-login {
  width: 100%; min-height: 52px;
  border: 0; border-radius: 999px;
  background: var(--teal-dark); color: #fff;
  font: inherit; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(11,63,77,0.35);
}
.btn-login:active { transform: translateY(1px); }
.btn-request {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; margin-top: 0.7rem;
  border-radius: 999px; border: 2px solid var(--teal-dark);
  color: var(--teal-dark); background: transparent;
  font: inherit; font-weight: 800; font-size: 0.92rem; letter-spacing: 0.05em;
  text-decoration: none; cursor: pointer; padding: 0 1rem;
}
.btn-request:hover { background: rgba(11,63,77,0.06); text-decoration: none; }
.auth-alt { margin: var(--s4) 0 0; font-size: 0.9rem; text-align: center; position: relative; color: rgba(255,255,255,0.9); }
.auth-alt a { color: #fff; font-weight: 800; }
.legal { margin: var(--s4) 0 0; font-size: 0.85rem; text-align: center; position: relative; }
.legal a { color: var(--teal-deep); font-weight: 700; margin: 0 0.5rem; min-height: 44px; display: inline-flex; align-items: center; }
/* Legal pages (Terms / Privacy): readable light card on the auth hero. */
.legal-card { background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.55); padding: 1.6rem 1.6rem 1.2rem; max-width: 700px; width: 100%; margin: 0 auto var(--s6); text-align: left; position: relative; }
.legal-card h2 { margin: 0 0 0.3rem; font-size: 1.4rem; letter-spacing: 0.01em; }
.legal-card h3 { margin: 1.1rem 0 0.25rem; font-size: 1.02rem; }
.legal-card p { margin: 0.25rem 0 0.6rem; line-height: 1.55; }
.legal-card .muted { font-size: 0.85rem; }
.legal-back { margin-top: 1.2rem; text-align: center; }
.legal-back a { font-weight: 800; color: var(--teal-deep); min-height: 44px; display: inline-flex; align-items: center; }
/* Invite request modal */
.modal-ov { position: fixed; inset: 0; background: rgba(8,46,57,0.55); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal-ov.open { display: flex; }
.modal { background: var(--card); color: var(--ink); border-radius: var(--radius); max-width: 380px; width: 100%; padding: 1.6rem 1.5rem 1.3rem; box-shadow: 0 24px 60px rgba(0,0,0,0.35); text-align: center; }
.modal h2 { margin: 0 0 0.6rem; font-size: 1.3rem; font-weight: 800; }
.modal p { margin: 0 0 1.2rem; color: var(--muted); line-height: 1.55; }
.modal .btn-login { display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; }
.modal-close { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; font-size: 0.95rem; min-height: 44px; padding: 0.5rem 1rem; margin-top: 0.5rem; cursor: pointer; }

/* --- Scattered droplet burst micro-interaction (Oct 2026) ---
   Water droplets scatter outward from lap-logging buttons on click. */
.drop-burst {
  position: absolute; inset: 0; pointer-events: none; overflow: visible;
  z-index: 5;
}
.drop-burst span {
  position: absolute; left: 50%; top: 50%;
  font-size: var(--fs, 15px); opacity: 0;
  animation: drop-scatter 0.48s cubic-bezier(0.15, 0.7, 0.4, 1) forwards;
}
@keyframes drop-scatter {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); }
}
.drop-btn { position: relative; }



/* Collapsible sections (Reports page, Oct 2026): collapsed by default. */
.collapsible {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--card);
}
.collapsible summary {
  cursor: pointer;
  padding: 0.8rem 1rem;
  font-weight: 800;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible-title { flex: 1; }
.collapsible-chevron {
  transition: transform 0.15s ease;
  color: var(--muted);
}
.collapsible[open] .collapsible-chevron { transform: rotate(180deg); }
.collapsible-body { padding: 0 1rem 1rem; }
.collapsible .count {
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
}

/* --- catalog multi-filter bar (Oct 2026): one input family, dark bar --- */
#catalogfilters { margin-bottom: 1rem; }
/* Dark teal container — the Catalog's original filter-bar identity. */
.cf-bar {
  background: linear-gradient(150deg, #0e4a5a 0%, var(--teal-deep) 75%);
  border-radius: 20px;
  padding: 0.65rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 14px rgba(8, 46, 57, 0.2);
}
/* View-scope row above the bar: status chips + ridden toggle (both view, not filters). */
.cf-viewrow { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cf-viewrow .chips { margin-bottom: 0; }
.cf-divider { width: 1px; align-self: stretch; min-height: 32px; background: var(--line); margin: 0 0.25rem; }
@media (max-width: 640px) { .cf-divider { display: none; } }
/* Sort select: light pill matching the view row. */
.cf-sort { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--muted); font-size: 0.95rem; }
.cf-sort select {
  appearance: auto;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  min-height: 44px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  max-width: 100%;
}
.cf-sort select:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }
.pills { display: inline-flex; border-radius: 999px; padding: 3px; gap: 2px; }
.pills-light { background: #e8f4f8; }
.pills-light .pill-opt span { color: var(--muted); }
.pills-light .pill-opt input:checked + span { background: var(--teal-dark); color: #fff; }
.pills-light .pill-opt input:focus-visible + span { outline: 2px solid var(--teal-dark); outline-offset: 2px; }
.pill-opt { position: relative; display: block; }
.pill-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill-opt span { display: flex; align-items: center; min-height: 44px; padding: 0.45rem 1.1rem; border-radius: 999px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.pill-opt input:focus-visible + span { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
/* Catalog bar: search + park dropdown + multi-pick panels + more + clear.
   One wrapping line on desktop; 2-col grid on phones (bar always visible). */
.cf-bar.cf-single { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.cf-bar.cf-single .cf-qfull { flex: 2 1 240px; min-width: 0; }
/* Park select: capped — native selects size to their longest option, which
   hogged the row and squeezed Type/Maker. Clips with the dropdown intact. */
.cf-bar.cf-single .fselect { flex: 0 1 210px; min-width: 0; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-bar.cf-single .fpanel { flex-shrink: 0; }
.cf-bar.cf-single .cf-morebtn, .cf-bar.cf-single .cf-clear { flex-shrink: 0; }
/* Same 44px box as the filter buttons so the whole row aligns. */
.cf-bar.cf-single .fsearch input[type="search"] { padding: 0.55rem 1rem 0.55rem 2.7rem; min-height: 44px; }
/* Park dropdown: native select styled like the panel buttons. */
.cf-bar .fselect {
  appearance: none; -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.12);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23cfe8ee' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px; color: #fff;
  padding: 0.55rem 2.4rem 0.55rem 1rem; min-height: 44px;
  font-family: inherit; font-weight: 800; font-size: 0.95rem;
  cursor: pointer; max-width: 100%;
}
.cf-bar .fselect option { color: #111; background: #fff; font-weight: 400; }
/* "More" toggle dot: signals hidden active filters (status/ridden/sort). */
.cf-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd166; display: inline-block; flex-shrink: 0; }
/* Secondary controls row, revealed by More — white box so the expanded
   controls read as a panel against the page background. */
.cf-morerow {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 0.8rem;
  box-shadow: var(--shadow);
}
.cf-morerow .cf-viewrow { margin-bottom: 0; }
@media (max-width: 1023px) {
  .cf-bar.cf-single { display: grid; grid-template-columns: 1fr 1fr; }
  .cf-bar.cf-single .cf-qfull { grid-column: 1 / -1; }
  .cf-bar.cf-single .fselect,
  .cf-bar.cf-single .fpanel > .fbtn,
  .cf-bar.cf-single .cf-morebtn { width: 100%; justify-content: space-between; }
  .cf-bar.cf-single .cf-clear { justify-self: start; align-self: center; }
}
.cf-bar .fbtn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.cf-bar .fbtn:hover { border-color: #fff; }
.cf-bar .fpanel[open] > .fbtn { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cf-bar .fchev { color: #cfe8ee; }
.cf-bar .cf-clear { color: #fff; }
.fpanel { position: relative; }
.fpanel > summary { list-style: none; }
.fpanel > summary::-webkit-details-marker { display: none; }
.fbtn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; min-height: 44px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-weight: 800; font-size: 0.95rem; color: var(--ink); cursor: pointer; font-family: inherit; max-width: 100%; }
.fbtn:hover { border-color: var(--teal); }
.fpanel[open] > .fbtn { border-color: var(--teal-dark); box-shadow: 0 0 0 1px var(--teal-dark); }
.fbtn [data-flabel] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; display: inline-flex; align-items: center; }
.fchev { color: var(--muted); font-size: 0.75rem; }
.fpanel-body { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(8, 46, 57, 0.18); padding: 0.5rem; min-width: 230px; max-width: min(320px, 86vw); max-height: 320px; overflow: auto; }
.fcheck { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem; min-height: 48px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.fcheck:hover { background: var(--bg); }
.fcheck input { width: 20px; height: 20px; accent-color: var(--teal-dark); flex-shrink: 0; margin: 0; }
.fcheck > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpanel-body [data-fdone] { margin: 0.4rem 0.2rem 0.2rem; }
.drops { display: inline-flex; gap: 1px; line-height: 0; white-space: nowrap; }
.drops svg { width: 1.05em; height: 1.05em; }
.drops svg path { fill: #14a3b8; }
.cf-clear { font-weight: 800; color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; padding: 0.6rem 0.4rem; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; cursor: pointer; font-size: 0.95rem; font-family: inherit; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.flt-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.55rem 0.4rem 0.85rem; min-height: 44px; border-radius: 999px; background: #e8f4f8; border: 1.5px solid var(--teal); color: var(--teal-dark); font-weight: 700; font-size: 0.9rem; text-decoration: none; cursor: pointer; font-family: inherit; }
a.flt-chip:hover { text-decoration: none; border-color: var(--teal-dark); }
.flt-chip [aria-hidden="true"] { font-size: 1.1rem; line-height: 1; padding: 0.1rem 0.25rem; }
.cf-explain { margin: 0 0 0.8rem; }
/* 3-across catalog cards on desktop (Kevin: smaller cards, three fit) */
.catalog-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 700px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.catalog-grid .card.ride { padding: 0.95rem 1rem; height: 100%; margin-bottom: 0; display: flex; flex-direction: column; min-width: 0; }
.catalog-grid .card.ride .card-tools { margin-top: auto; }
.catalog-grid .card.ride h3 { overflow-wrap: break-word; }
@media (max-width: 640px) {
  .fbtn [data-flabel] { max-width: 130px; }
}
