/* Styles for app pages (buses, forum, auth). Builds on styles.css tokens. */

.app-main { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.2em; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* Empty states */
.empty {
  background: var(--paper);
  border: 1px dashed rgba(243, 238, 226, 0.25);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.empty h2 { font-size: 1.6rem; }
.empty p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }
.empty .btn { margin-top: 0.6rem; }

/* Forum category list */
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat h2 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.cat p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cat-stat { text-align: right; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.cat-stat strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }

.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Auth "opening soon" card */
.auth-card {
  background: var(--deep);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  max-width: 560px;
  margin: 0 auto;
}
.auth-card h1 { color: #fff; font-size: 2rem; }
.auth-card p { color: var(--ink-soft); }
.auth-card .btn { margin-top: 0.5rem; }

/* Forms */
.wrap.narrow { max-width: 720px; }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  max-width: 520px;
  margin: 0 auto;
}
.form-card h1 { font-size: 2rem; margin-bottom: 0.3em; }
.form-lede { color: var(--ink-soft); margin-bottom: 1.4rem; }

.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; }
.form label > span { font-weight: 600; font-size: 0.95rem; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input:not([type=checkbox]), .form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(243, 238, 226, 0.22);
  border-radius: 10px;
  background: var(--field);
  font: inherit;
  color: var(--ink);
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--yellow); outline-offset: 1px; border-color: var(--ink); }
.form small { color: var(--muted); font-size: 0.85rem; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 4.4rem !important; }
.pw-toggle {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cream-dark); color: var(--ink-soft); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); }
.form .err { color: var(--rust); font-style: normal; font-size: 0.9rem; font-weight: 600; }
.form .check { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.form .check input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--rust); }
.form .check span { font-weight: 400; }
.form .btn { align-self: flex-start; }
.form-foot { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.form-foot.muted { color: var(--muted); font-size: 0.85rem; }

.alert {
  background: rgba(232, 118, 76, 0.18);
  color: #f3a384;
  border: 1px solid rgba(232, 118, 76, 0.35);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.alert.ok { background: rgba(143, 185, 150, 0.16); color: #a9d4b1; border-color: rgba(143, 185, 150, 0.35); }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.4rem;
}
.panel h2 { font-size: 1.3rem; }
.panel p { color: var(--ink-soft); }

.inline-form { display: inline; margin: 0; }
.inline-form .btn { font: inherit; font-family: var(--font-display); font-weight: 700; }

/* Long-form pages (rules, privacy) */
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.prose h2 { font-size: 1.25rem; margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose code { background: var(--cream-dark); padding: 0.1em 0.4em; border-radius: 4px; color: var(--yellow); }
.muted { color: var(--muted); }

/* Bus form */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(243, 238, 226, 0.22);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.4rem 0 2rem; }
.btn-danger { background: transparent; color: var(--rust); border-color: var(--rust); }
.btn-danger:hover { background: var(--rust); color: #fff; }
details.danger { border: 1px solid rgba(232, 118, 76, 0.35); border-radius: var(--radius); padding: 0.8rem 1.2rem; color: var(--muted); }
details.danger summary { cursor: pointer; font-weight: 600; color: var(--rust); }
details.danger p { margin: 0.8rem 0; }

/* Bus profile */
.bus-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.bus-cover { border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.bus-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bus-cover .bus-photo { aspect-ratio: 4 / 3; }
.bus-cover .bus-photo img { aspect-ratio: auto; object-fit: contain; }
.bus-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.4rem 0 0.2rem; }
.bus-specline { color: var(--ink-soft); font-weight: 600; margin: 0 0 0.3rem; }
.bus-owner { color: var(--muted); font-size: 0.95rem; }
.bus-owner a { color: var(--ink); text-decoration: none; }
.bus-owner a:hover { text-decoration: underline; }
.chip-status { background: var(--yellow); color: var(--ink-dark); }
.bus-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.inline-form .btn { font-family: var(--font-display); }

.bus-section { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.bus-section > h2, .section-row h2, h2.sub { font-size: 1.5rem; margin-bottom: 1rem; }
.count { font-size: 0.9rem; color: var(--muted); font-weight: 600; margin-left: 0.4rem; }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.spec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.spec h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.spec p { margin: 0; color: var(--ink-soft); white-space: pre-line; }

/* Photos */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.shot { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.shot figcaption { padding: 0.6rem 0.9rem 0; font-size: 0.9rem; color: var(--ink-soft); }
.shot-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding: 0.6rem 0.9rem 0.8rem; }
.caption-form { display: flex; gap: 0.3rem; flex: 1 1 100%; }
.caption-form input { flex: 1; min-width: 0; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid rgba(243, 238, 226, 0.2); background: var(--field); color: var(--ink); font: inherit; font-size: 0.85rem; }
.mini {
  font: inherit; font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--cream-dark); color: var(--ink-soft); cursor: pointer;
}
.mini:hover { color: var(--ink); border-color: var(--ink-soft); }
.mini.danger { color: var(--rust); }
.mini.is-cover { background: var(--yellow); color: var(--ink-dark); border-color: transparent; cursor: default; }

.upload { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.upload-box {
  flex: 1 1 320px; display: flex; gap: 0.8rem; align-items: center; cursor: pointer;
  padding: 1rem 1.2rem; border: 1.5px dashed rgba(243, 238, 226, 0.3); border-radius: var(--radius); color: var(--ink-soft); font-size: 0.92rem;
}
.upload-box:hover { border-color: var(--yellow); }
.upload-box input { font-size: 0.85rem; max-width: 220px; }

/* Build log */
.log { display: grid; gap: 1rem; margin-top: 1.2rem; }
.entry { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.entry-head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.entry-head h3 { font-size: 1.15rem; margin: 0; flex: 1; }
.entry-head time { color: var(--muted); font-size: 0.9rem; }
.entry .prose p:last-child { margin-bottom: 0; }
.entry .prose img { max-width: 100%; border-radius: 8px; }

/* Directory filters + real photo cards */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.6rem; }
.filters a { font-size: 0.85rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
.filters a:hover { color: var(--ink); border-color: var(--ink-soft); }
.filters a.on { background: var(--yellow); color: var(--ink-dark); border-color: transparent; }
.bus-photo.real { padding: 0; background: var(--paper); }
.bus-photo.real img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .bus-hero, .spec-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* Forum */
.wrap.narrow-wide { max-width: 900px; }
.cat-latest { margin-top: 0.4rem !important; font-size: 0.85rem !important; }
.cat-latest span { color: var(--ink); font-weight: 600; }
.cat-stat strong { margin-right: 0.3rem; }
.thread-h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.thread-title { color: var(--ink); }
.pin { font-size: 0.85em; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.2rem; margin: 1.6rem 0; color: var(--muted); font-size: 0.95rem; }
.pager a { font-weight: 600; text-decoration: none; color: var(--ink); }
.pager a:hover { text-decoration: underline; }

.posts { display: grid; gap: 1rem; }
.post {
  display: grid;
  grid-template-columns: 150px 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.post:target { outline: 2px solid var(--yellow); }
.post-who { padding: 1.1rem 1rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-start; background: rgba(0, 0, 0, 0.15); }
.post-who .avatar { margin-bottom: 0.4rem; }
.post-name { font-weight: 700; text-decoration: none; color: var(--ink); }
.post-name:hover { text-decoration: underline; }
.post-handle, .post-meta { font-size: 0.8rem; color: var(--muted); }
.post-body { padding: 1rem 1.3rem 1.2rem; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 0.8rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.post-time { color: var(--muted); text-decoration: none; }
.post-time:hover { text-decoration: underline; }
.post-edited { font-style: italic; }
.post-tools { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }
.post-tools .mini { text-decoration: none; }
.post-body .prose p:last-child { margin-bottom: 0; }
.post-body .prose pre { background: var(--field); padding: 0.8rem 1rem; border-radius: 8px; overflow-x: auto; }
.post-body .prose blockquote { border-left: 3px solid var(--yellow); margin: 0.8rem 0; padding: 0.2rem 0 0.2rem 1rem; color: var(--ink-soft); }
.post-body .prose img { max-width: 100%; border-radius: 8px; }
.reply-box { margin-top: 2rem; }
.photos-field input[type=file] { font-size: 0.9rem; color: var(--ink-soft); }
.photos-field input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; padding: 0.45rem 0.9rem; margin-right: 0.8rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.post-body .prose img { display: block; max-height: 70vh; width: auto; margin: 0.8rem 0; }
.reply-box h2 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
  .post-who { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.7rem 1rem; }
  .post-who .avatar { margin: 0; width: 32px; height: 32px; }
}

/* Search + moderation */
.searchbar { display: flex; gap: 0.6rem; margin-bottom: 2rem; }
.searchbar input { flex: 1; padding: 0.8rem 1rem; border-radius: 999px; border: 1.5px solid rgba(243, 238, 226, 0.22); background: var(--field); color: var(--ink); font: inherit; }
.searchbar input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.snip { margin: 0.3rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.snip mark { background: rgba(245, 179, 1, 0.35); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.badge { display: inline-block; min-width: 1.3em; padding: 0 0.4em; border-radius: 999px; background: var(--rust); color: #fff; font-size: 0.75rem; text-align: center; font-weight: 700; }
.members { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.members th, .members td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
.members th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.members a { color: var(--ink); text-decoration: none; }
.members a:hover { text-decoration: underline; }
.members select { font: inherit; font-size: 0.9rem; padding: 0.3rem 0.5rem; border-radius: 8px; background: var(--field); color: var(--ink); border: 1px solid var(--line); }
.members tr.is-banned td { opacity: 0.6; }
.entry blockquote { margin: 0.6rem 0; padding: 0.4rem 0 0.4rem 1rem; border-left: 3px solid var(--line); }
@media (max-width: 640px) { .members th:nth-child(3), .members td:nth-child(3) { display: none; } }

/* Front page: plain intro, then content. No eyebrows, glows or feature cards. */
.intro { border-bottom: 1px solid var(--line); background: var(--paper); }
.intro-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.5rem;
  align-items: center;
  padding: 2.2rem 0 2rem;
}
.intro h1 { font-size: 2rem; font-weight: 700; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.intro p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 60ch; }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; margin: 0 !important; }
.intro-links a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.intro-links .btn { padding: 0.55rem 1.2rem; border-radius: 8px; font-size: 0.95rem; }
.intro-bus { width: 100%; height: auto; display: block; }

/* One column, left-aligned with the intro text: forum, then buses, then sections. */
.front {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  gap: 2.5rem;
  padding: 2rem 0 3.5rem;
}
.front-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
  margin-bottom: 0.2rem;
}
.front-head h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: 0; }
.front-head a { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.front-head a:hover { color: var(--ink); text-decoration: underline; }

.topics { list-style: none; margin: 0; padding: 0; }
.topics li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.topic-title { display: block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.topic-title:hover { color: var(--yellow); }
.topic-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin-top: 0.25rem; font-size: 0.83rem; color: var(--muted); }
.topic-cat { color: var(--yellow); text-decoration: none; }
.topic-cat:hover { text-decoration: underline; }
.front-more { margin: 0.9rem 0 0; font-size: 0.9rem; }
.front-more a { color: var(--ink-soft); }

.front-side { display: flex; flex-direction: column; gap: 2.5rem; }
.mini-buses, .section-list { list-style: none; margin: 0; padding: 0; }
.mini-buses li { border-bottom: 1px solid var(--line); }
.mini-buses a { display: flex; gap: 0.8rem; align-items: center; padding: 0.6rem 0; text-decoration: none; color: inherit; }
.mini-buses a:hover strong { color: var(--yellow); }
.mini-thumb { flex: 0 0 72px; height: 54px; border-radius: 6px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-thumb img.is-art { object-fit: contain; padding: 4px; }
.mini-text { display: flex; flex-direction: column; min-width: 0; }
.mini-text strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text span { font-size: 0.83rem; color: var(--muted); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 0.8rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.activity-bus { font-weight: 600; color: var(--ink); text-decoration: none; margin-right: 0.35rem; }
.activity-what { color: var(--ink-soft); text-decoration: none; }
.activity a:hover { color: var(--yellow); }
.activity .topic-meta { margin-top: 0.15rem; }
.section-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.section-list a { color: var(--ink-soft); text-decoration: none; }
.section-list a:hover { color: var(--ink); text-decoration: underline; }
.section-list span { color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .intro-inner { grid-template-columns: 1fr; gap: 1rem; padding-top: 1.6rem; }
  .intro-bus { max-width: 220px; order: -1; }
  .front { gap: 2rem; }
}

/* Trips: maps, trip list, stops, videos */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form input[type=date] { color-scheme: dark; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-row h2 { margin: 0; }
.map-label { font-size: 0.95rem; color: var(--ink-soft); margin: 0 0 0.5rem; font-family: var(--font-body); font-weight: 600; }
.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; margin-bottom: 1.2rem; background: #1b1f1d; }
.map.is-editable { cursor: crosshair; }
/* OSM tiles are light; invert them to sit in the dark theme. Markers and lines aren't affected. */
.map .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(88%); }
.map .leaflet-control-attribution { background: rgba(20, 23, 21, 0.75); color: var(--muted); }
.map .leaflet-control-attribution a { color: var(--ink-soft); }
.leaflet-popup-content { margin: 10px 12px; font-family: var(--font-body); }
.pop-name { font-weight: 700; color: #1f2421; }
.pop-date { font-size: 0.8rem; color: #555; }
.pop-trip { display: block; margin-top: 0.3rem; font-size: 0.85rem; }

.trip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.trip-list a { display: flex; gap: 0.9rem; align-items: center; padding: 0.6rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.trip-list a:hover { border-color: var(--ink-soft); }
.trip-thumb { flex: 0 0 96px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--cream-dark); display: grid; place-items: center; font-size: 1.6rem; }
.trip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trip-text { display: flex; flex-direction: column; min-width: 0; }
.trip-text strong { color: var(--ink); }
.trip-text span { font-size: 0.85rem; color: var(--muted); }

.stop-form { margin-bottom: 1rem; }
.geo-search { display: flex; gap: 0.5rem; }
.geo-search input { flex: 1; }
.geo-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.geo-results li { border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); padding: 0; }
.geo-results li:last-child { border-bottom: 0; }
.geo-results button { width: 100%; text-align: left; padding: 0.55rem 0.8rem; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; }
.geo-results button:hover { background: var(--cream-dark); }
.small { font-size: 0.85rem; margin: 0; }
.stop-list { margin: 0; padding-left: 1.4rem; }
.stop-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.stop-list li > * { margin-right: 0.6rem; }
.stop-name { font-weight: 600; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.video { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video-play:hover img { opacity: 1; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 10px; background: rgba(0, 0, 0, 0.75); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video figcaption { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; padding: 0.6rem 0.9rem; font-size: 0.92rem; }

.map-tall { height: 520px; }

/* Places to stay */
.filters-form { margin-bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.filters-form label > span { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.3rem; }
.filters-form select, .filters-form input[type=search] { width: 100%; padding: 0.6rem 0.8rem; border: 1.5px solid rgba(243, 238, 226, 0.22); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; }
.near-row { display: flex; gap: 0.6rem; align-items: flex-end; }
.near-field { flex: 1; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.filters-form .check, .amen-grid .check { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; }
.filters-form .check span { font-weight: 400; margin: 0; display: inline; }
.amen-filter summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.4rem 1rem; margin-top: 0.6rem; border: 0; padding: 0; }
.amen-grid legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; }
.filters-form .btn { align-self: flex-start; }
.place-cards { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.6rem; }
.place-cards a { display: flex; gap: 0.9rem; align-items: center; padding: 0.6rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.place-cards a:hover { border-color: var(--ink-soft); }
.kind-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #1f2421; }
.kind-campground { background: #8fb996; } .kind-public_land { background: #f5b301; } .kind-rv_park { background: #7fb3d5; }
.kind-business { background: #d7a3e0; } .kind-member_land { background: #e8764c; } .kind-other { background: #cfc9bb; }
.stars { color: var(--yellow); letter-spacing: 1px; }
.amen-chips { margin: 0.4rem 0 1.4rem; }

/* Profile links */
.links-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; }
.links-form .btn { grid-column: 1 / -1; justify-self: start; }
.profile-links { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-links a { display: inline-block; padding: 0.35rem 0.85rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 0.9rem; font-weight: 600; background: var(--paper); }
.profile-links a:hover { border-color: var(--yellow); color: var(--yellow); }
@media (max-width: 640px) { .links-form { grid-template-columns: 1fr; } }

/* Bus location (members' map) */
.loc-box { margin: 1rem 0 0; padding: 0.9rem 1rem; border: 1px dashed rgba(243, 238, 226, 0.25); border-radius: var(--radius); font-size: 0.95rem; }
.loc-box p { margin: 0 0 0.6rem; color: var(--ink-soft); }
.loc-box .geo-search input { padding: 0.55rem 0.8rem; border-radius: 10px; border: 1.5px solid rgba(243, 238, 226, 0.22); background: var(--field); color: var(--ink); font: inherit; }
@media (max-width: 640px) { .filter-row { grid-template-columns: 1fr; } }
.pop-bus { margin-top: 0.25rem; font-size: 0.9rem; }
.place-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.place-list li { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.place-town { font-weight: 600; }
.place-buses a { color: var(--ink); }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .map { height: 300px; }
  .map-tall { height: 380px; }
  .place-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Error pages */
.error-page { text-align: center; padding: 3rem 0; }
.error-page h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--rust); line-height: 1; }

@media (max-width: 640px) {
  .cat { grid-template-columns: 1fr; }
  .cat-stat { text-align: left; }
  .cat-stat strong { display: inline; margin-right: 0.3rem; }
}

/* ---- direct messages ---- */
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { text-decoration: underline; }
.inbox { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.inbox li { border-bottom: 1px solid var(--line); }
.inbox a { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 0.4rem; text-decoration: none; color: inherit; }
.inbox a:hover { background: var(--paper); }
.inbox .avatar { flex: 0 0 auto; }
.inbox-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.inbox-top { display: flex; gap: 0.5rem; align-items: baseline; }
.inbox-top strong { font-weight: 600; color: var(--ink); }
.inbox-top time { margin-left: auto; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.inbox-last { color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox li.is-unread .inbox-last { color: var(--ink-soft); font-weight: 600; }
.chat { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0 1.4rem; }
.msg { max-width: min(80%, 34rem); }
.msg.mine { align-self: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg-body { padding: 0.6rem 0.85rem; border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg.mine .msg-body { background: var(--yellow); color: var(--ink-dark); border-bottom-right-radius: 4px; }
.msg.theirs .msg-body { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; padding: 0 0.3rem; }
.msg.mine .msg-meta { justify-content: flex-end; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--rust); }
.send-box { display: flex; flex-direction: column; gap: 0.6rem; }
.send-box .btn { align-self: flex-end; }
.site-header .brand { white-space: nowrap; }
