/* NatureFix Trails — web version of the app's single trail-stop player.
   Colours, type and sizes follow the app (PlayerScreen / InlineAudioPlayer). */

:root {
  --navy: #242d42;
  --teal: #43a7ab;
  --white: #ffffff;
  --soft: rgba(255, 255, 255, 0.85);
  --faint: rgba(255, 255, 255, 0.6);
  --line: rgba(255, 255, 255, 0.7);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --ink: #1a1a1a;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--white);
  background: #3b4e18;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Fern photo + green gradient behind every screen, as in the app */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      199.6deg,
      rgba(159, 196, 63, 0.45) 4.2%,
      rgba(88, 117, 36, 0.81) 26.4%,
      rgba(59, 78, 24, 0.9) 98.4%
    ),
    url('/assets/onboarding-bg.jpg') center / cover no-repeat;
}

/* The stop player sits on the app's plain navy player background */
body.is-player {
  background: var(--navy);
}
body.is-player .bg {
  display: none;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px)
    calc(env(safe-area-inset-right) + var(--pad))
    calc(env(safe-area-inset-bottom) + 40px)
    calc(env(safe-area-inset-left) + var(--pad));
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

/* ---------- Loading / messages ---------- */

/* "/" : finding the nearest stop, then redirecting */
#locate-state {
  width: 100%;
  text-align: center;
}

#locate-state .spinner {
  margin: 0 auto;
}

.locate-text {
  font-size: 15px;
  color: var(--soft);
  margin: 18px 0 0;
}

.loading {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.loading-logo {
  width: 170px;
  height: auto;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.message {
  text-align: center;
  padding: 60px 10px;
}

.message h1 {
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 10px;
}

.message p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--soft);
  margin: 0 0 28px;
}

.noscript {
  text-align: center;
  padding: 40px 20px;
}

/* ---------- Shared bits ---------- */

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.brand img {
  width: 96px;
  height: auto;
}

.circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  text-decoration: none;
}

.circle.lg {
  width: 48px;
  height: 48px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 400;
  min-width: 140px;
  text-decoration: none;
}

.pill.solid {
  background: var(--teal);
  border-color: var(--teal);
}

.pill[disabled] {
  opacity: 0.55;
  cursor: default;
}

.topbar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.source {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
}

.source-title,
.source-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-title {
  font-size: 15px;
  font-weight: 400;
}

.source-subtitle {
  font-size: 13px;
  color: var(--soft);
  margin-top: 2px;
}

/* ---------- Stop player ---------- */

.hero {
  width: 100%;
  aspect-ratio: 100 / 66;
  border-radius: 16px;
  border: 1.5px solid var(--white);
  overflow: hidden;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.title {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
}

.subtitle {
  font-size: 16px;
  line-height: 1.45;
  margin: 8px 0 0;
}

.track-line {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-line .icon {
  width: 18px;
  height: 18px;
}

.player {
  margin-top: 28px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.seek {
  position: relative;
  margin-top: 22px;
  height: 24px;
  display: flex;
  align-items: center;
}

.seek input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --pct: 0%;
}

.seek input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--white) var(--pct),
    rgba(255, 255, 255, 0.3) var(--pct)
  );
}

.seek input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.seek input[type='range']::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--white);
}

.seek input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  margin-top: -6px;
}

.seek input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
}

.times {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.status {
  min-height: 20px;
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--soft);
}

.status.error {
  color: #ffd6d6;
}

.get-app {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  line-height: 1.6;
}

.get-app a {
  color: var(--soft);
}

/* ---------- Home + trail pages ---------- */

.page-title {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.section-heading {
  font-weight: 700;
  font-size: 22px;
  margin: 30px 0 4px;
}

.section-sub {
  font-size: 15px;
  color: var(--soft);
  margin: 6px 0 12px;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  text-decoration: none;
}

.thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex: none;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Trail images are partner logos: always whole, on a white tile */
.thumb.logo {
  background: var(--white);
  padding: 6px;
}

.thumb.logo img {
  object-fit: contain;
}

.thumb .num {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.row-text {
  flex: 1;
  min-width: 0;
}

.row-name {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
}

.row-meta {
  font-size: 13px;
  color: var(--soft);
  margin-top: 4px;
  line-height: 1.35;
}

.row .chev {
  opacity: 0.7;
}

.trail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.trail-logo {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: var(--white);
  padding: 8px;
  flex: none;
}

.trail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.trail-place {
  font-size: 14px;
  color: var(--soft);
  margin-top: 4px;
}

details.about {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 14px 18px;
  margin: 4px 0 18px;
}

details.about summary {
  cursor: pointer;
  font-weight: 400;
  font-size: 15px;
}

details.about .about-body {
  font-size: 15px;
  line-height: 1.55;
  margin-top: 12px;
}

.empty {
  background: var(--glass);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-size: 15px;
  margin-top: 12px;
}

/* Playlist trails: numbered track list under the Listen button */
.tracks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.track:last-child {
  border-bottom: 0;
}

.track-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 400;
  flex: none;
}

.track-name {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

/* ---------- Maps ---------- */

.map-card {
  height: 300px;
  border-radius: 24px;
  overflow: hidden;
  margin: 22px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.map-card.small {
  height: 230px;
  margin: 16px 0 0;
}

.user-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f80ed;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 6px rgba(47, 128, 237, 0.28);
}

.mapboxgl-popup-content {
  font-family: var(--font);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
}

.map-popup-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.map-popup-meta {
  font-size: 13px;
  color: #555;
  margin-top: 2px;
}

.map-popup-link {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2f8a8e;
  text-decoration: none;
}

/* ---------- Onsite gate ---------- */

.gate {
  margin-top: 28px;
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.gate-icon,
.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.gate-icon.warn,
.modal-icon.warn {
  background: #c0504d;
}

.gate-icon .icon,
.modal-icon .icon {
  width: 26px;
  height: 26px;
}

.gate-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.gate-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--soft);
  margin: 0;
}

.gate-distance {
  font-size: 15px;
  font-weight: 400;
  margin: 14px 0 0;
}

.gate-distance .icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 4px;
}

.gate-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
  margin: 12px 0 0;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.spinner.small {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
}

/* ---------- Test location badge ---------- */

.test-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5c542;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 18px;
}

.test-loc .icon {
  width: 18px;
  height: 18px;
}

.test-loc a {
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Popups ---------- */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 24, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal:focus {
  outline: none;
}

.modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--navy);
  color: var(--white);
  border-radius: 24px;
  padding: 26px 22px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.modal h2 {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 10px;
}

.modal-lead {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  margin: 0 0 8px;
}

.modal-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
  text-align: center;
  margin: 0;
}

.modal-note {
  min-height: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #ffd6d6;
  text-align: center;
  margin: 12px 0 0;
}

.modal-note:empty {
  display: none;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
}

.btn[disabled] {
  opacity: 0.6;
}

/* "NatureFix is better in the app": the store button leads, the web option
   is deliberately quiet */
.app-prompt-icon {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 4px auto 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.app-prompt-store {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 17px 20px;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(67, 167, 171, 0.35);
}

.app-prompt-web {
  border-color: transparent;
  background: none;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 16px 14px;
  margin-top: 18px;
}

.guide-label {
  font-size: 14px;
  text-align: center;
  margin: 0;
}

.guide-note {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  margin: 12px 0 0;
}

.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 4px;
  margin: 18px 0 6px;
}

.tab {
  flex: 1;
  padding: 8px 6px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 400;
}

.tab.active {
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
}

.guide-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.guide-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.guide-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.guide-body {
  flex: 1;
  min-width: 0;
}

.guide-body p {
  font-size: 15px;
  line-height: 1.45;
  margin: 2px 0 0;
}

.guide-extra {
  font-size: 13px;
  line-height: 1.5;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  margin: 6px 0 0;
}

/* Drawn, simplified versions of what the phone or browser shows */
.mock {
  margin: 10px 0 0;
  max-width: 300px;
  color: #111;
  font-family: -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.guide > .mock {
  margin: 12px auto 0;
}

.mock .icon {
  width: 18px;
  height: 18px;
}

.mock .hl {
  position: relative;
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--teal);
  animation: hl-pulse 1.6s ease-in-out infinite;
}

@keyframes hl-pulse {
  50% {
    box-shadow: 0 0 0 3px var(--teal), 0 0 0 8px rgba(67, 167, 171, 0.35);
  }
}

.mock-ios-alert {
  width: 270px;
  background: rgba(242, 242, 247, 0.97);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}

.mock-ios-text {
  padding: 18px 16px 16px;
  font-size: 15px;
  line-height: 1.3;
}

.mock-ios-buttons {
  display: flex;
  border-top: 1px solid #c8c8cc;
}

.mock-ios-buttons span {
  flex: 1;
  padding: 11px 6px;
  font-size: 17px;
  color: #007aff;
}

.mock-ios-buttons span + span {
  border-left: 1px solid #c8c8cc;
}

.mock-ios-buttons .hl {
  font-weight: 600;
  border-radius: 0 0 14px 0;
  /* inset ring: an outer one gets clipped by the alert's rounded corners */
  background: rgba(67, 167, 171, 0.16);
  box-shadow: inset 0 0 0 3px var(--teal);
  animation: none;
}

.mock-sheet {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
}

.mock-sheet-head {
  font-size: 14px;
  color: #444;
}

.mock-sheet-perm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin: 8px 0 12px;
}

.mock-sheet-btn {
  text-align: center;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0b57d0;
  border-radius: 18px;
  margin-top: 4px;
}

.mock-sheet-btn.hl {
  border-radius: 18px;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border-radius: 14px;
  padding: 8px 12px;
}

.mock-bar-btn {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  padding: 0 4px;
}

.mock-bar-url {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-bar-end {
  color: #777;
  display: inline-flex;
}

.mock-menu {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.mock-menu-row {
  padding: 10px 14px;
  font-size: 15px;
  border-bottom: 1px solid #ececec;
}

.mock-menu-row:last-child {
  border-bottom: 0;
}

.mock-menu-row.hl {
  border-radius: 10px;
  background: #f0fbfb;
}

.mock-menu-row.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mock-value {
  color: #8e8e93;
}

.mock-toggle {
  width: 42px;
  height: 25px;
  border-radius: 13px;
  background: #34c759;
  position: relative;
  flex: none;
}

.mock-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.mock-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mock-tiles span {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e8eaed;
  border-radius: 16px;
  padding: 12px;
  font-size: 14px;
}

.mock-tiles span.on {
  background: #0b57d0;
  color: #ffffff;
  border-radius: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .mock .hl {
    animation: none;
  }
}

/* ---------- "Open in the app" banner (Android, and iPhone browsers other
   than Safari, which shows Apple's own Smart App Banner) ---------- */

.app-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px 8px;
  background: #f4f5f7;
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.app-banner[hidden] {
  display: none;
}

body.has-banner main {
  padding-top: 22px;
}

.app-banner-close {
  width: 28px;
  height: 28px;
  font-size: 22px;
  line-height: 1;
  color: #8a8a8e;
  flex: none;
}

.app-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex: none;
}

.app-banner-text {
  flex: 1;
  min-width: 0;
}

.app-banner-title {
  font-size: 15px;
  font-weight: 600;
}

.app-banner-sub {
  font-size: 12px;
  color: #6b6b70;
  margin-top: 2px;
}

.app-banner-open {
  background: var(--teal);
  color: var(--white);
  border-radius: 18px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  flex: none;
}

/* ---------- "/" when more than 5 km from any stop ---------- */

.far-home {
  text-align: center;
}

.far-lead {
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
  margin: 6px 0 0;
}

.far-nearest {
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 20px 0 0;
}

.far-nearest .icon {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 4px;
}

.far-nearest b {
  color: var(--white);
  font-weight: 600;
}

.far-app {
  margin-top: 30px;
  padding: 24px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.far-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.far-app .section-heading {
  margin-top: 12px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.store-other {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--soft);
}

/* ---------- /e/<id>: a shared activity ---------- */

.activity-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 8px;
}

.activity .far-app {
  text-align: center;
}

/* The track's body text, below the player (as in the app) */
.body-card {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 15px;
  line-height: 1.6;
}

.body-card[hidden] {
  display: none;
}

.body-card b {
  font-weight: 600;
}

/* ---------- Notes to nature (notes.js) ---------- */

.note-cta {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.note-cta[hidden] {
  display: none;
}

.note-invite {
  font-size: 14px;
  line-height: 1.55;
  color: var(--soft);
  text-align: center;
  margin: 0 0 16px;
}

.note-input {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #333;
  font: 16px/1.45 var(--font); /* 16px stops iPhone zooming in */
  resize: vertical;
}

.note-input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.note-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.note-share > span:first-child {
  flex: 1;
}

/* A switch, like the app's: the real checkbox stays for keyboards and screen
   readers, laid over the drawing */
.note-share input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.note-share .switch {
  position: relative;
  flex: none;
  width: 50px;
  height: 30px;
  border-radius: 15px;
  background: #afafaf;
  transition: background 0.2s;
}

.note-share .switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s;
}

.note-share input:checked + .switch {
  background: var(--teal);
}

.note-share input:checked + .switch::after {
  transform: translateX(20px);
}

.note-share input:focus-visible + .switch {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.note-dismiss {
  border-color: transparent;
}

.note-leaf {
  font-size: 32px;
  text-align: center;
}

.modal .notes-title {
  font-size: 26px;
  margin: 8px 0 4px;
}

.notes-subtitle {
  font-size: 15px;
  color: var(--soft);
  text-align: center;
  margin: 0 0 16px;
}

.note-submitted {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.notes-empty {
  font-size: 14px;
  color: var(--soft);
  text-align: center;
  margin: 8px 0;
}

.note-columns {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.note-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--white);
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font);
  cursor: pointer;
}

.note-text {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  /* long notes are cut short here; tap to read the whole note */
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-meta {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 300;
  color: #646464;
}

/* One note, opened from the list */
.modal.note-view {
  background: var(--white);
  color: var(--ink);
}

.note-full {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-full-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.note-full-actions button {
  background: none;
  border: 0;
  padding: 8px 0;
  font: 14px var(--font);
  cursor: pointer;
}

.note-flag {
  color: #c77700;
}

.note-delete {
  color: #c0392b;
  font-weight: 700 !important;
}

.note-back {
  margin-left: auto;
  color: var(--ink);
  font-weight: 600 !important;
}
