@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@600;700;800&display=swap");

:root {
  --blue: #0037b7;
  --blue-dark: #001577;
  --red: #ed1719;
  --gold: #ffd51f;
  --text: #101827;
  --muted: #596170;
  --line: #dde3ec;
  --panel: #ffffff;
  --font-ui: "Inter", Arial, Helvetica, sans-serif;
  --font-heading: "Montserrat", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  background:
    radial-gradient(ellipse at 8% 86%, rgba(0, 57, 184, 0.07), transparent 12rem),
    radial-gradient(ellipse at 94% 36%, rgba(242, 31, 34, 0.045), transparent 17rem),
    #fff;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  align-items: center;
  background: linear-gradient(100deg, #00279f 0%, #0038b9 48%, #001672 100%);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  min-height: 88px;
  padding: 0 clamp(28px, 6vw, 64px);
  position: sticky;
  top: 0;
  z-index: 10000;
}

.site-header > * {
  min-width: 0;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-family: var(--font-heading);
  gap: 16px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
}

.brand img {
  display: block;
  height: 120px;
  margin: -16px 0 -28px;
  transform: translateY(6px);
  width: 120px;
  object-fit: contain;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(18px, 2vw, 31px);
  justify-content: center;
  min-width: 0;
}

.main-nav a {
  font-size: 16px;
  font-weight: 600;
  padding: 35px 0 30px;
  position: relative;
}

.main-nav a.active::after {
  background: var(--red);
  border-radius: 999px;
  bottom: 17px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}

.header-actions,
.hero-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.logout-form {
  margin: 0;
}

.icon-btn,
.btn,
.cta {
  align-items: center;
  border: 0;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-heading);
  font-weight: 600;
  justify-content: center;
}

.icon-btn {
  background: transparent;
  height: 42px;
  width: 42px;
}

.icon-btn svg {
  height: 23px;
  width: 23px;
}

.btn {
  font-size: 13px;
  min-height: 38px;
  padding: 0 17px;
}

.btn:disabled,
.btn[disabled] {
  background: #eef2f7;
  border: 1px solid #c8d0dc;
  color: #687386;
  cursor: not-allowed;
  opacity: 1;
}

.btn-blue,
.cta-blue {
  background: linear-gradient(180deg, #0b62ee, #0034b1);
}

.btn-red,
.cta-red {
  background: linear-gradient(180deg, #ff302d, #dc1115);
}

.hero {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.78) 34%, rgba(255, 255, 255, 0.1) 58%),
    url("../images/elements/hero-cyclists-road.jpg") center center / cover no-repeat;
  min-height: 446px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  background:
    url("../images/wave_head.png") center bottom / 110vw 100% no-repeat,
    linear-gradient(178deg, transparent 0 55%, #fff 56%);
  bottom: 0;
  content: "";
  height: 118px;
  left: 50%;
  position: absolute;
  right: auto;
  transform: translateX(-50%);
  width: 100vw;
}

.hero-copy {
  max-width: 560px;
  padding: 82px clamp(28px, 7.2vw, 92px) 132px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0 0 18px;
}

.hero p {
  color: #262c36;
  font-size: 21px;
  line-height: 1.38;
  margin: 0 0 27px;
}

.cta {
  box-shadow: 0 10px 22px rgba(0, 30, 120, 0.22);
  font-size: 16px;
  gap: 11px;
  min-height: 50px;
  min-width: 174px;
  padding: 0 20px;
}

.cta svg {
  height: 25px;
  width: 25px;
}

.content {
  margin: 0 auto;
  max-width: 1136px;
  padding: 18px 24px 78px;
  position: relative;
  width: 100%;
}

.content::before {
  right: 8px;
  top: -42px;
  transform: rotate(7deg);
}

.content::after {
  bottom: 10px;
  left: -58px;
  transform: rotate(-8deg);
}

.page-head {
  margin: 32px 0 24px;
}

.page-head h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.page-head p {
  color: var(--muted);
  font-size: 16px;
}

.page-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 32px 0 24px;
}

.page-heading h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.1;
  margin: 0;
}

.page-heading p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 6px;
}

.page-subhead {
  font-family: var(--font-heading);
  font-size: 24px;
  margin: 40px 0 18px;
}

.messages {
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: min(720px, calc(100vw - 32px));
  position: fixed;
  top: 104px;
  transform: translateX(-50%);
  width: 100%;
  z-index: 30;
}

.message {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #cfe3ff;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(8, 32, 80, 0.14);
  color: #123660;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  line-height: 1.45;
  padding: 13px 14px 13px 16px;
}

.messages.is-hiding {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  transform: translate(-50%, -8px);
}

.message-error {
  background: #fff1f1;
  border-color: #f3c5c6;
  color: #8d1417;
}

.message-success {
  background: #f0fbf4;
  border-color: #bfe8cb;
  color: #195c2d;
}

.message-close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0 6px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-page {
  display: grid;
  justify-items: center;
  padding-top: 34px;
}

.auth-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(8, 32, 80, 0.075);
  display: grid;
  grid-template-columns: minmax(360px, 0.94fr) minmax(420px, 1fr);
  max-width: 1040px;
  overflow: hidden;
  width: 100%;
}

.auth-visual {
  background:
    linear-gradient(180deg, rgba(0, 23, 111, 0.18), rgba(0, 18, 92, 0.82)),
    url("../images/elements/hero-river-road.jpg") center / cover no-repeat;
  color: #fff;
  display: grid;
  min-height: 620px;
  padding: 34px;
}

.auth-visual-copy {
  align-self: start;
  max-width: 410px;
}

.auth-kicker {
  color: var(--red);
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.auth-visual .auth-kicker {
  background: var(--gold);
  border-radius: 5px;
  color: #0d1a32;
  padding: 7px 9px;
}

.auth-visual h1 {
  font-family: var(--font-heading);
  font-size: 44px;
  line-height: 1.08;
  margin: 0 0 16px;
}

.auth-visual p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.5;
}

.auth-visual-stats {
  align-self: end;
  display: grid;
  gap: 10px;
}

.auth-visual-stats span {
  background: rgba(255, 255, 255, 0.92);
  border-left: 5px solid var(--red);
  border-radius: 7px;
  color: #162033;
  display: grid;
  gap: 3px;
  padding: 13px 15px;
}

.auth-visual-stats b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 16px;
}

.auth-visual-stats small {
  color: var(--muted);
  font-size: 12px;
}

.auth-panel {
  align-self: center;
  padding: 38px 42px;
}

.auth-head {
  margin-bottom: 22px;
}

.auth-head h2 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.auth-head p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.social-auth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-auth-link {
  align-items: center;
  border: 1px solid #d5dde9;
  border-radius: 7px;
  color: #172236;
  display: grid;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  grid-template-columns: 32px 1fr;
  min-height: 50px;
  padding: 8px 12px;
}

.social-auth-link:hover {
  border-color: #aebbd0;
  box-shadow: 0 8px 18px rgba(8, 32, 80, 0.08);
}

.social-auth-link span {
  align-items: center;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.social-auth-link b {
  overflow-wrap: anywhere;
}

.social-auth-vk span {
  background: #0077ff;
}

.social-auth-yandex span {
  background: #fc3f1d;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  margin: 22px 0;
}

.auth-divider::before,
.auth-divider::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-name-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label > span {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  background: #f8fafd;
  border: 1px solid #ccd6e4;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.auth-form input::placeholder {
  color: #8d98aa;
}

.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
  outline: 0;
}

.auth-form ul,
.form-errors ul {
  color: #9a171a;
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-errors {
  background: #fff1f1;
  border: 1px solid #f3c5c6;
  border-radius: 7px;
  padding: 10px 12px;
}

.auth-submit {
  font-size: 14px;
  margin-top: 6px;
  min-height: 48px;
  width: 100%;
}

.auth-switch {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 18px;
  text-align: center;
}

.auth-switch a {
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 700;
}

.stats {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, 1fr);
  margin: 2px 0 32px;
}

.stats article {
  align-items: center;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px 18px;
  grid-template-columns: 48px auto;
  justify-content: center;
  min-height: 82px;
}

.stats article:last-child {
  border-right: 0;
}

.stats svg {
  color: var(--red);
  grid-row: span 2;
  height: 46px;
  width: 46px;
}

.stats strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.stats span {
  font-size: 15px;
}

.dashboard {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.055);
  min-height: 386px;
  padding: 24px 22px;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-head h2 {
  align-items: center;
  display: flex;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  gap: 11px;
  line-height: 1.15;
  margin: 0;
}

.panel-head a,
.panel-more {
  color: var(--blue);
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
}

.section-icon {
  align-items: center;
  background: var(--red);
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.media-list {
  display: grid;
  gap: 20px;
}

.media-list article {
  display: grid;
  gap: 16px;
  grid-template-columns: 126px 1fr;
  position: relative;
}

.media-list img {
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

h3 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 2px 0 6px;
}

p {
  margin: 0;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 6px;
}

.media-list article p:not(.meta) {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.panel-more {
  display: inline-block;
  margin: 18px 0 0 142px;
}

.trip-list article {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: 60px 1fr;
  padding: 0 0 22px;
}

.trip-list article + article {
  padding-top: 22px;
}

.trip-list article:last-child {
  border-bottom: 0;
}

.trip-page .trip-list {
  display: grid;
  gap: 16px;
}

.trip-page .trip-list article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.045);
  padding: 18px;
}

.trip-page .trip-list article + article {
  padding-top: 18px;
}

time {
  align-items: center;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  height: 66px;
  justify-content: center;
}

time strong {
  color: var(--red);
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 700;
}

time span {
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
}

.avatars {
  display: flex;
  gap: 0;
  margin-top: 14px;
}

.avatars img,
.avatar {
  border: 2px solid #fff;
  border-radius: 50%;
  display: inline-block;
  height: 24px;
  margin-left: -6px;
  object-fit: cover;
  width: 24px;
}

.avatars img:first-child {
  margin-left: 0;
}

.avatars b {
  color: var(--muted);
  font-size: 12px;
  margin-left: 12px;
}

.trip-countdown {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  margin: 12px 0 4px;
  max-width: 270px;
}

.trip-countdown span {
  background: #f4f7fb;
  border: 1px solid #dce5f0;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 48px;
  padding: 7px 4px 5px;
}

.trip-countdown b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1;
}

.trip-countdown small {
  color: var(--muted);
  font-size: 10px;
}

.trip-countdown.is-started span {
  background: #fff4f4;
  border-color: #f3c5c6;
}

.trip-countdown.is-started b {
  color: var(--red);
}

.trip-schedule {
  align-items: start;
}

.trip-page .trip-schedule .trip-card {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: 72px minmax(0, 1fr) minmax(300px, 38%);
}

.trip-card > * {
  min-width: 0;
}

.trip-card-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.trip-card-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.trip-card-head h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.trip-route-link {
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: var(--blue);
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 11px;
}

.trip-card-main > p {
  color: #263245;
  font-size: 15px;
  line-height: 1.55;
}

.trip-block-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.trip-block-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.trip-block-title b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 14px;
}

.trip-participants {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.trip-participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-participant {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e2e8f1;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  max-width: 190px;
  min-height: 34px;
  min-width: 0;
  padding: 4px 10px 4px 4px;
}

.trip-participant-going {
  background: #f0fbf4;
  border-color: #bfe8ca;
}

.trip-participant-maybe {
  background: #fff8e8;
  border-color: #f1d49a;
}

.trip-participant-declined {
  background: #fff1f1;
  border-color: #efc2c4;
}

.trip-participant img,
.trip-avatar-fallback {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 26px;
  width: 26px;
}

.trip-participant img {
  object-fit: cover;
}

.trip-avatar-fallback {
  align-items: center;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
}

.trip-participant > span {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-participant b {
  color: var(--blue);
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
}

.trip-empty-note,
.trip-track-missing {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.trip-route-panel {
  background: #f8fafc;
  border: 1px solid #e1e8f1;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.trip-map {
  background: #e9eff6;
  border-radius: 6px;
  min-height: 220px;
  overflow: hidden;
}

.trip-map iframe,
.trip-map img,
.trip-map-empty {
  border: 0;
  display: block;
  height: 220px;
  width: 100%;
}

.trip-map img {
  object-fit: cover;
}

.trip-map-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: center;
}

.trip-route-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.trip-track-link {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
}

.trip-track-link span {
  color: #273142;
  font-size: 13px;
  font-weight: 700;
}

.trip-track-link b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 12px;
}

.trip-form-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 32, 80, 0.06);
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1fr);
  overflow: hidden;
}

.trip-form-summary {
  background:
    linear-gradient(180deg, rgba(0, 38, 150, 0.88), rgba(0, 20, 110, 0.96)),
    url("../images/elements/thumb-cyclists.jpg") center / cover no-repeat;
  color: #fff;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 30px;
}

.trip-form-summary h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
}

.trip-form-summary p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.trip-form {
  display: grid;
  gap: 15px;
  padding: 30px;
}

.trip-form label:not(.trip-route-choice):not(.trip-invite-card) {
  display: grid;
  gap: 7px;
}

.trip-form label:not(.trip-route-choice):not(.trip-invite-card) > span,
.trip-invite-field legend {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.trip-form input,
.trip-form select,
.trip-form textarea {
  background: #f8fafd;
  border: 1px solid #ccd6e4;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.trip-form input:focus,
.trip-form select:focus,
.trip-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
  outline: 0;
}

.trip-form .errorlist {
  color: #9a171a;
  font-size: 13px;
  line-height: 1.4;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trip-form label:has(.errorlist) input,
.trip-form label:has(.errorlist) select,
.trip-form label:has(.errorlist) textarea,
.trip-form fieldset:has(.errorlist) {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}

.trip-form label:has(.errorlist) > span,
.trip-form fieldset:has(.errorlist) legend {
  color: #9a171a;
}

.trip-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-route-field,
.trip-invite-field {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
}

.trip-invite-list {
  display: grid;
  gap: 8px;
}

.trip-route-field legend {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.trip-choice-tools {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.trip-choice-tools label {
  display: grid;
  gap: 7px;
}

.trip-choice-tools label > span {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.trip-choice-pages {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
  flex-wrap: nowrap;
  min-height: 46px;
}

.trip-choice-pages button {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: var(--blue);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
}

.trip-choice-pages button:disabled {
  background: #eef2f7;
  color: #8a96a8;
  cursor: default;
}

.trip-choice-pages span {
  color: var(--muted);
  font-size: 12px;
}

.trip-route-choice-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 360px;
  overflow: auto;
}

.trip-route-choice {
  cursor: pointer;
  display: block;
  min-width: 0;
}

.trip-route-choice[hidden],
.trip-invite-card[hidden] {
  display: none !important;
}

.trip-route-choice input,
.trip-invite-card input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.trip-route-choice-card {
  background: #f8fafd;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 82px;
  overflow: hidden;
  padding: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.trip-route-choice-card img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.trip-route-choice-copy {
  align-content: center;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.trip-route-choice-copy b,
.trip-invite-card b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-route-choice-copy small,
.trip-invite-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.trip-route-choice input:checked + .trip-route-choice-card,
.trip-invite-card:has(input:checked) {
  background: #eef4ff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
}

.trip-route-choice input:focus-visible + .trip-route-choice-card,
.trip-invite-card:has(input:focus-visible) {
  outline: 3px solid rgba(0, 55, 183, 0.2);
  outline-offset: 2px;
}

.trip-invite-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 280px;
  overflow: auto;
}

.trip-invite-card {
  align-items: center;
  background: #f8fafd;
  border: 1px solid #e2e8f1;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 58px;
  min-width: 0;
  padding: 8px 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.trip-invite-card img {
  border-radius: 50%;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.trip-invite-card > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.trip-form-actions,
.group-ride-status-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trip-cancel-form {
  border-top: 1px solid var(--line);
  grid-column: 2;
  padding: 0 30px 30px;
}

.trip-state {
  border-radius: 999px;
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 10px;
  padding: 7px 10px;
}

.trip-state-canceled {
  background: #fff1f1;
  border: 1px solid #e6b5b8;
  color: #9a171a;
}

.trip-state-completed {
  background: #f0fbf4;
  border: 1px solid #b7dfc1;
  color: #19672b;
}

.trip-manage-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.trip-manage-actions form {
  margin: 0;
}

.trip-manage-actions .btn {
  min-height: 36px;
}

.trip-card-actions {
  border-top: 1px solid var(--line);
  grid-column: 2 / -1;
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 14px;
}

.trip-manage-note {
  color: #9a171a;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.group-ride-status-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.group-ride-route-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
}

.group-ride-route-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.group-ride-route-copy h3 {
  font-size: 22px;
  margin: 0;
}

.group-ride-route-copy > p:not(.meta) {
  color: #273142;
  font-size: 15px;
  line-height: 1.55;
}

.group-ride-route-map,
.group-ride-route-map > iframe,
.group-ride-route-map > img,
.group-ride-route-map .route-leaflet,
.group-ride-route-map .route-map-empty {
  height: 360px;
  min-height: 360px;
}

.status-choice,
.status-pill {
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.status-choice {
  border: 1px solid #cfd8e6;
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
}

.status-choice-going,
.status-pill-going {
  background: #f0fbf4;
  border-color: #b7dfc1;
  color: #19672b;
}

.status-choice-maybe,
.status-pill-maybe {
  background: #fff8e8;
  border-color: #e8c982;
  color: #7b5607;
}

.status-choice-declined,
.status-pill-declined {
  background: #fff1f1;
  border-color: #e6b5b8;
  color: #9a171a;
}

.status-choice.is-active {
  box-shadow: inset 0 0 0 2px currentColor;
}

.status-pill {
  display: inline-flex;
  line-height: 1;
  padding: 5px 8px;
}

.report-list article {
  grid-template-columns: 126px 1fr;
}

.report-list .thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}

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

.report-list .thumb-wrap .badge {
  position: absolute;
  right: 0;
  bottom: 1px;
  border-radius: 5px 0 0 0;
}

.report-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.report-page-nav a {
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
}

.reports-page {
  display: grid;
  gap: 22px;
}

.report-page-section {
  scroll-margin-top: 110px;
}

.report-list h3 a {
  color: inherit;
}

.report-detail {
  display: grid;
  gap: 22px;
}

.report-detail-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 20px;
}

.report-detail-head h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.report-detail-cover {
  aspect-ratio: 16 / 7;
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.report-trip-summary {
  background: #f7f9fc;
  border: 1px solid #e2e8f1;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px 16px;
}

.report-trip-summary span,
.report-trip-summary small {
  color: var(--muted);
  font-size: 12px;
}

.report-trip-summary strong {
  font-family: var(--font-heading);
  font-size: 16px;
}

.report-form-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 32, 80, 0.06);
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(420px, 1fr);
  overflow: hidden;
}

.report-form-summary {
  background:
    linear-gradient(180deg, rgba(0, 38, 150, 0.86), rgba(0, 20, 110, 0.96)),
    url("../images/elements/thumb-water.jpg") center / cover no-repeat;
  color: #fff;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 30px;
}

.report-form-summary h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
}

.report-form-summary p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.report-form-photo-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-form-photo-strip img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.report-form {
  display: grid;
  gap: 15px;
  padding: 30px;
}

.report-form label {
  display: grid;
  gap: 7px;
}

.report-form label > span {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.report-form input,
.report-form select,
.report-form textarea {
  background: #f8fafd;
  border: 1px solid #ccd6e4;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.report-form input[type="file"] {
  background: #fff;
  padding: 11px 12px;
}

.report-form input:focus,
.report-form select:focus,
.report-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
  outline: 0;
}

.report-form ul {
  color: #9a171a;
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-form textarea[name="text"] {
  display: none;
}

.report-editor-field {
  align-self: start;
  position: sticky;
  top: 104px;
  z-index: 25;
}

.report-ride-field {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
}

.report-ride-field legend {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.report-ride-choice-list {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow: auto;
}

.report-ride-choice {
  cursor: pointer;
  display: block;
  min-width: 0;
}

.report-ride-choice[hidden] {
  display: none !important;
}

.report-ride-choice input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.report-ride-choice-card {
  background: #f8fafd;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 92px;
  overflow: hidden;
  padding: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.report-ride-choice-card img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.report-ride-choice-card > span {
  align-content: center;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.report-ride-choice-card b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-ride-choice-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-ride-choice input:checked + .report-ride-choice-card {
  background: #eef4ff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
}

.report-ride-choice input:focus-visible + .report-ride-choice-card {
  outline: 3px solid rgba(0, 55, 183, 0.2);
  outline-offset: 2px;
}

.report-editor {
  background: #fff;
  border: 1px solid #ccd6e4;
  border-radius: 8px;
  overflow: hidden;
}

.report-editor:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
}

.report-editor .ql-toolbar.ql-snow {
  align-items: center;
  background: #f5f8fc;
  border: 0;
  border-bottom: 1px solid #dbe4ef;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.report-editor .ql-toolbar.ql-snow .ql-formats {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  margin: 0;
}

.report-editor .ql-toolbar.ql-snow button {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: #1f2a3d;
  cursor: pointer;
  height: 32px;
  min-height: 32px;
  padding: 5px;
  width: 34px;
}

.report-editor .ql-toolbar.ql-snow .report-gallery-insert-button {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 0 9px;
  width: auto;
}

.report-editor .ql-toolbar.ql-snow button:hover,
.report-editor .ql-toolbar.ql-snow button.ql-active {
  background: #eef4ff;
  border-color: var(--blue);
  color: var(--blue);
}

.report-editor .ql-toolbar.ql-snow button:hover .ql-stroke,
.report-editor .ql-toolbar.ql-snow button.ql-active .ql-stroke,
.report-editor .ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke,
.report-editor .ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke {
  stroke: var(--blue);
}

.report-editor .ql-toolbar.ql-snow button:hover .ql-fill,
.report-editor .ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: var(--blue);
}

.report-editor .ql-toolbar.ql-snow .ql-picker {
  color: #1f2a3d;
  font-family: var(--font-heading);
  font-size: 13px;
  height: 32px;
}

.report-editor .ql-toolbar.ql-snow .ql-picker-label {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  display: flex;
  min-height: 32px;
}

.report-editor .ql-container.ql-snow {
  border: 0;
  color: var(--text);
  font: inherit;
}

.report-editor .ql-editor {
  height: clamp(300px, calc(100vh - 260px), 560px);
  font-size: 16px;
  line-height: 1.65;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.report-editor .ql-editor.ql-blank::before {
  color: #8d98aa;
  font-style: normal;
  left: 16px;
  right: 16px;
}

.report-editor .ql-editor p {
  margin: 0 0 12px;
}

.report-rich-text h2,
.report-editor .ql-editor h2,
.report-rich-text h3,
.report-editor .ql-editor h3 {
  color: var(--blue);
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 18px 0 8px;
}

.report-rich-text ul,
.report-rich-text ol,
.report-editor .ql-editor ul,
.report-editor .ql-editor ol {
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  list-style-position: outside;
  margin: 12px 0 16px 22px;
  padding: 0;
}

.report-rich-text li,
.report-editor .ql-editor li {
  margin: 4px 0;
  padding-left: 4px;
}

.report-rich-text figure,
.report-editor .ql-editor figure {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.report-rich-text img,
.report-editor .ql-editor img,
.report-rich-text video,
.report-editor .ql-editor video,
.report-rich-text iframe,
.report-editor .ql-editor iframe {
  aspect-ratio: 16 / 9;
  background: #eef3f8;
  border: 0;
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

.report-rich-text .report-gallery-inline-photo,
.report-editor .ql-editor .report-gallery-inline-photo {
  color: inherit;
  display: block;
  margin: 18px 0;
}

.report-rich-text iframe,
.report-editor .ql-editor iframe {
  min-height: 320px;
}

.report-rich-text figcaption,
.report-editor .ql-editor figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.report-rich-text blockquote,
.report-editor .ql-editor blockquote {
  border-left: 3px solid var(--blue);
  color: #334155;
  margin: 16px 0;
  padding-left: 14px;
}

.report-gallery-upload {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.report-cover-upload {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.report-cover-preview {
  background: #eef3f8;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  overflow: hidden;
  padding: 0;
  text-align: inherit;
}

.report-cover-preview:hover,
.report-cover-preview:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.1);
  outline: 0;
}

.report-cover-preview img {
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  width: 100%;
}

.report-cover-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-cover-actions span {
  color: var(--muted);
  font-size: 12px;
}

.report-hidden-file-input {
  display: none;
}

.report-gallery-upload-head {
  display: grid;
  gap: 4px;
}

.report-gallery-upload-head span {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.report-gallery-upload-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-gallery-drop {
  align-items: center;
  background: #f8fafd;
  border: 1px dashed #b8c6d8;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  min-height: 92px;
  padding: 16px;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.report-gallery-drop:hover,
.report-gallery-drop:focus-within,
.report-gallery-drop.is-dragover {
  background: #eef4ff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.1);
}

.report-gallery-drop input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.report-gallery-drop-icon {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.report-gallery-drop-icon svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 24px;
}

.report-gallery-drop-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-gallery-drop-copy b {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

.report-gallery-drop-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-gallery-preview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-gallery-preview:empty {
  display: none;
}

.report-gallery-preview figure {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.report-gallery-edit-thumb {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
  padding: 0;
  text-align: inherit;
}

.report-gallery-edit-thumb:focus-visible {
  outline: 3px solid rgba(0, 55, 183, 0.2);
  outline-offset: 2px;
}

.report-gallery-preview img,
.report-gallery-edit-thumb img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.report-photo-caption-field {
  display: grid;
  gap: 4px;
}

.report-photo-caption-field span {
  color: var(--muted);
  font-size: 11px;
}

.report-photo-caption-field input {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.report-photo-caption-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.1);
  outline: 0;
}

.report-gallery-preview figcaption,
.report-photo-caption-field input {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-gallery-picker[hidden] {
  display: none;
}

.report-gallery-picker {
  align-items: center;
  background: rgba(6, 18, 38, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2200;
}

.report-gallery-picker-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(6, 18, 38, 0.35);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 780px;
  overflow: auto;
  padding: 18px;
  width: min(780px, 100%);
}

.report-gallery-picker-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.report-gallery-picker-head strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 20px;
}

.report-gallery-picker-head button {
  align-items: center;
  background: #f5f8fc;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  color: #1f2a3d;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.report-gallery-picker-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-gallery-picker-grid button {
  background: #f8fafd;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  text-align: left;
}

.report-gallery-picker-grid button:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.1);
}

.report-gallery-picker-grid img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.report-gallery-picker-grid span,
.report-gallery-picker-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-gallery-picker-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-photo-edit-modal[hidden] {
  display: none;
}

.report-photo-edit-modal {
  align-items: center;
  background: rgba(6, 18, 38, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 24300;
}

.report-photo-edit-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(6, 18, 38, 0.35);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 820px;
  overflow: auto;
  padding: 18px;
  width: min(820px, 100%);
}

.report-photo-edit-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.report-photo-edit-head strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 20px;
}

.report-photo-edit-head button {
  align-items: center;
  background: #f5f8fc;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  color: #1f2a3d;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.report-photo-cropper {
  aspect-ratio: 4 / 3;
  background: #e8eef5;
  border-radius: 8px;
  cursor: grab;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.report-photo-cropper.is-cover {
  aspect-ratio: 16 / 7;
}

.report-photo-cropper.is-dragging {
  cursor: grabbing;
}

.report-photo-cropper img {
  left: 50%;
  max-width: none;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform-origin: center;
}

.report-photo-edit-controls,
.report-photo-edit-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-photo-edit-controls label {
  display: grid;
  flex: 1 1 220px;
  gap: 5px;
}

.report-photo-edit-controls label span {
  color: var(--muted);
  font-size: 12px;
}

.report-photo-edit-controls input[type="range"] {
  width: 100%;
}

.report-photo-edit-actions {
  justify-content: end;
}

.report-thumb {
  align-self: start;
  position: relative;
}

.report-thumb img {
  display: block;
}

.badge {
  background: var(--blue);
  border-radius: 5px 0 7px 0;
  bottom: 0;
  color: #fff;
  font-size: 11px;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 6px 8px;
  position: absolute;
  right: 0;
}

.members {
  display: grid;
  gap: 14px;
}

.members article {
  align-items: center;
  display: grid;
  gap: 13px;
  grid-template-columns: 52px 1fr 58px 58px;
}

.avatar {
  border: 0;
  height: 44px;
  margin: 0;
  width: 44px;
}

.members p {
  display: grid;
  gap: 3px;
}

.members b {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.members small {
  color: var(--muted);
  font-size: 11px;
}

.members strong {
  display: grid;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  justify-items: center;
}

.member-hero {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.045);
  display: grid;
  gap: 22px;
  grid-template-columns: 112px 1fr;
  margin-bottom: 18px;
  padding: 26px;
}

.member-hero-avatar {
  border-radius: 50%;
  height: 112px;
  object-fit: cover;
  width: 112px;
}

.member-hero h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  margin: 4px 0 10px;
}

.member-hero p:not(.meta) {
  color: #273142;
  font-size: 16px;
  line-height: 1.55;
}

.member-profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.member-profile-facts div {
  background: #f7f9fc;
  border: 1px solid #e2e8f1;
  border-radius: 7px;
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 8px 10px;
}

.member-profile-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.member-profile-facts dd {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.member-edit-link,
.profile-cancel-link {
  color: var(--blue);
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
}

.profile-edit-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 32, 80, 0.06);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1fr);
  overflow: hidden;
}

.profile-edit-preview {
  background:
    linear-gradient(180deg, rgba(0, 38, 150, 0.88), rgba(0, 20, 110, 0.96)),
    url("../images/elements/thumb-cyclists.jpg") center / cover no-repeat;
  color: #fff;
  display: grid;
  gap: 18px;
  padding: 30px;
}

.profile-edit-preview .member-hero-avatar {
  border: 4px solid rgba(255, 255, 255, 0.9);
}

.profile-edit-preview h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.1;
  margin: 0 0 10px;
}

.profile-edit-preview p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

.profile-edit-form {
  display: grid;
  gap: 15px;
  padding: 30px;
}

.profile-edit-form label {
  display: grid;
  gap: 7px;
}

.profile-edit-form label > span,
.profile-field-label {
  color: #2b3445;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.profile-edit-form input,
.profile-edit-form select,
.profile-edit-form textarea {
  background: #f8fafd;
  border: 1px solid #ccd6e4;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.avatar-editor {
  display: grid;
  gap: 12px;
}

.avatar-editor input[type="file"] {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.avatar-picker {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e2e8f1;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 86px minmax(0, 1fr);
  padding: 14px;
}

.avatar-picker-frame {
  border-radius: 50%;
  height: 86px;
  position: relative;
  width: 86px;
}

.avatar-picker-frame [hidden] {
  display: none !important;
}

.avatar-picker-preview,
.avatar-placeholder {
  border: 3px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  box-shadow: 0 8px 18px rgba(8, 32, 80, 0.12);
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.avatar-placeholder {
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.avatar-placeholder::before {
  color: #fff;
  content: "?";
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
}

.avatar-placeholder-male {
  background: linear-gradient(180deg, #2368d8, #0037b7);
}

.avatar-placeholder-male::before {
  content: "М";
}

.avatar-placeholder-female {
  background: linear-gradient(180deg, #f1537a, #c81d4c);
}

.avatar-placeholder-female::before {
  content: "Ж";
}

.avatar-placeholder-neutral {
  background: linear-gradient(180deg, #7a8699, #475467);
}

.avatar-placeholder-neutral::before {
  content: "";
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: none;
  height: 18px;
  position: relative;
  transform: translateY(-11px);
  width: 18px;
}

.avatar-placeholder-neutral::after {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px 999px 18px 18px;
  content: "";
  height: 22px;
  left: 50%;
  position: absolute;
  top: 49px;
  transform: translateX(-50%);
  width: 42px;
}

.avatar-clear-button {
  align-items: center;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(8, 32, 80, 0.18);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 19px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 2px;
  position: absolute;
  right: -5px;
  top: -5px;
  width: 28px;
}

.avatar-picker p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
}

.avatar-pick-button {
  min-height: 40px;
}

.avatar-modal {
  align-items: center;
  background: rgba(7, 18, 42, 0.58);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 50;
}

.avatar-modal.is-open {
  display: flex;
}

.avatar-modal-dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 48px);
  max-width: 520px;
  overflow: auto;
  padding: 22px;
  width: min(100%, 520px);
}

.avatar-modal-head {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.avatar-modal-head h2 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 5px;
}

.avatar-modal-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.avatar-modal-close {
  background: #f2f5f9;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  color: #273142;
  cursor: pointer;
  font-size: 24px;
  height: 36px;
  line-height: 1;
  width: 36px;
}

.avatar-crop {
  aspect-ratio: 1;
  background:
    linear-gradient(45deg, #dfe7f1 25%, transparent 25% 75%, #dfe7f1 75%),
    linear-gradient(45deg, #dfe7f1 25%, #edf2f7 25% 75%, #dfe7f1 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  border: 1px solid #cfd8e6;
  border-radius: 50%;
  cursor: grab;
  justify-self: center;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: min(320px, 100%);
}

.avatar-crop:active {
  cursor: grabbing;
}

.avatar-crop img {
  left: 50%;
  max-width: none;
  position: absolute;
  top: 50%;
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.avatar-editor-controls {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.avatar-editor-controls input[type="range"] {
  accent-color: var(--blue);
  min-height: 34px;
  padding: 0;
}

.avatar-reset {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.avatar-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.avatar-modal-actions .btn {
  min-height: 42px;
  min-width: 130px;
}

.profile-edit-form input:focus,
.profile-edit-form select:focus,
.profile-edit-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 183, 0.12);
  outline: 0;
}

.profile-edit-form ul {
  color: #9a171a;
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-number-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-edit-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.profile-edit-actions .btn {
  min-height: 44px;
  min-width: 150px;
}

.member-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 24px;
}

.member-stat-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 16px;
}

.member-stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.member-stat-grid strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.15;
}

.member-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.member-main,
.member-side,
.member-route-list,
.member-ride-card-list,
.member-report-list {
  display: grid;
  gap: 14px;
}

.member-route-list article,
.member-ride-card-list article {
  align-items: center;
  border: 1px solid #e7ecf3;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 74px;
  padding: 14px;
}

.member-route-list h3,
.member-ride-card-list h3,
.member-report-list h3 {
  margin: 0 0 6px;
}

.member-route-list p:not(.meta),
.member-ride-card-list p:not(.meta),
.member-report-list p:not(.meta) {
  line-height: 1.45;
}

.member-route-list strong,
.member-ride-card-list strong {
  color: var(--blue);
  display: grid;
  font-family: var(--font-heading);
  font-size: 18px;
  gap: 3px;
  justify-items: end;
}

.member-route-list strong small,
.member-ride-card-list strong small {
  color: var(--muted);
  font-size: 10px;
}

.member-report-list article {
  border: 1px solid #e7ecf3;
  border-radius: 8px;
  padding: 14px;
}

.back-link {
  color: var(--blue);
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 18px;
}

.route-detail {
  overflow-x: hidden;
}

.route-cover {
  border-radius: 8px;
  min-height: 430px;
  margin-bottom: 18px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.route-cover::after {
  background: linear-gradient(90deg, rgba(6, 18, 38, 0.84) 0%, rgba(6, 18, 38, 0.58) 45%, rgba(6, 18, 38, 0.12) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.route-cover-image {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.route-cover-copy {
  color: #fff;
  display: grid;
  gap: 16px;
  max-width: 680px;
  min-width: 0;
  padding: clamp(32px, 6vw, 64px);
  position: relative;
  z-index: 1;
}

.route-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-pills span {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
}

.route-cover-copy h1 {
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
}

.route-cover-copy > p {
  font-size: 17px;
  line-height: 1.55;
  max-width: 620px;
  overflow-wrap: anywhere;
}

.route-author {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.route-author .avatar {
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.route-author span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.route-author b {
  color: #fff;
  font-family: var(--font-heading);
}

.route-stat-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.route-stat-grid article {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 18px 20px;
}

.route-stat-grid article:first-child {
  border-radius: 8px 0 0 8px;
}

.route-stat-grid article:last-child {
  border-radius: 0 8px 8px 0;
}

.route-stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.route-stat-grid strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.1;
}

.route-layout {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.route-main,
.route-side {
  display: grid;
  gap: 22px;
}

.route-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.045);
  padding: 24px;
}

.route-section h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.route-section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.route-section-head h2 {
  margin: 0;
}

.route-section-link {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.route-text {
  color: #273142;
  font-size: 16px;
  line-height: 1.65;
}

.route-text p + p {
  margin-top: 14px;
}

.route-track-summary { display: grid; gap: 14px; }
.route-track-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.route-track-stats article { background: #f7f9fc; border: 1px solid #e7ecf3; border-radius: 7px; display: grid; gap: 4px; padding: 12px; }
.route-track-stats span { color: var(--muted); font-size: 12px; }
.route-track-stats strong { color: var(--ink); font-family: var(--font-heading); font-size: 20px; }
.route-track-note { color: var(--muted); font-size: 13px; margin: 0; }

.route-map {
  background: #eef3f8;
  border-radius: 7px;
  min-height: 430px;
  overflow: hidden;
}

.route-map > iframe,
.route-map > img {
  border: 0;
  display: block;
  height: 430px;
  object-fit: cover;
  width: 100%;
}

.track-download {
  align-items: center;
  background: linear-gradient(180deg, #0b62ee, #0034b1);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
}

.track-download svg {
  height: 20px;
  width: 20px;
}

.route-leaflet,
.route-map-empty {
  height: 430px;
  min-height: 430px;
  width: 100%;
}

.route-map .leaflet-container img {
  height: auto;
  min-height: 0;
  object-fit: initial;
  width: auto;
}

.route-map.group-ride-route-map {
  height: 360px;
  min-height: 360px;
}

.route-map.group-ride-route-map > iframe,
.route-map.group-ride-route-map > img,
.route-map.group-ride-route-map .route-leaflet,
.route-map.group-ride-route-map .route-map-empty,
.route-map.group-ride-route-map .leaflet-container {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.route-map-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.route-cover-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.route-edit-action {
  align-items: center;
  background: #fff;
  border-radius: 6px;
  color: var(--blue);
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
}

.route-editor-page {
  max-width: 1280px;
}

.route-editor-shell {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.route-editor-map-panel,
.route-editor-fields {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.045);
}

.route-editor-map-panel {
  overflow: hidden;
}

.route-editor-map {
  background: #e9eff6;
  height: min(68vh, 640px);
  min-height: 500px;
  position: relative;
  width: 100%;
}

.route-editor-map.is-disabled::after {
  align-items: center;
  color: var(--muted);
  content: "Mapbox token required";
  display: flex;
  font-family: var(--font-heading);
  inset: 0;
  justify-content: center;
  position: absolute;
}

.route-editor-toolbar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
}

.route-editor-toolbar .btn {
  min-height: 40px;
}

.route-editor-toolbar p {
  color: var(--muted);
  flex: 1 1 260px;
  font-size: 13px;
  line-height: 1.45;
}

.route-riders {
  display: grid;
  gap: 10px;
}

.route-riders article {
  align-items: center;
  border: 1px solid #e7ecf3;
  border-radius: 7px;
  display: grid;
  gap: 11px;
  grid-template-columns: 44px 1fr 58px;
  padding: 10px;
}

.route-riders p {
  display: grid;
  gap: 4px;
}

.route-riders b {
  font-family: var(--font-heading);
  font-size: 13px;
}

.route-riders small {
  color: var(--muted);
  font-size: 12px;
}

.route-riders strong {
  color: var(--blue);
  display: grid;
  font-family: var(--font-heading);
  font-size: 15px;
  gap: 2px;
  justify-items: end;
}

.route-riders strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.mini-photo-strip {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 52px);
  margin-top: 2px;
}

.mini-photo-strip a {
  display: block;
}

.mini-photo-strip a:nth-child(n+4) {
  display: none;
}

.mini-photo-strip img {
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.inline-report-link {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.route-trips {
  display: grid;
  gap: 14px;
}

.route-trips article {
  display: grid;
  gap: 12px;
  grid-template-columns: 54px 1fr;
}

.route-trips time {
  height: 58px;
}

.route-report-preview {
  display: grid;
  gap: 16px;
}

.route-report-preview article {
  display: grid;
  gap: 14px;
  grid-template-columns: 112px 1fr;
}

.route-report-preview img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.route-report-preview article > div,
.route-group-rides p {
  min-width: 0;
}

.route-report-preview p:not(.meta) {
  font-size: 14px;
  line-height: 1.45;
}

.route-group-rides {
  display: grid;
  gap: 10px;
}

.route-group-rides article {
  align-items: center;
  border: 1px solid #e7ecf3;
  border-radius: 7px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 48px;
  padding: 12px;
}

.route-group-rides p {
  display: grid;
  gap: 4px;
}

.route-group-rides b {
  font-family: var(--font-heading);
  font-size: 13px;
}

.route-group-rides small {
  color: var(--muted);
  font-size: 12px;
}

.route-group-rides strong {
  color: var(--blue);
  display: grid;
  font-family: var(--font-heading);
  font-size: 18px;
  justify-items: end;
}

.route-authors-head {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 32, 80, 0.045);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  margin-bottom: 24px;
  padding: 28px;
}

.route-authors-head h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 10px;
}

.route-authors-head > strong {
  color: var(--blue);
  display: grid;
  font-family: var(--font-heading);
  font-size: 34px;
  justify-items: center;
}

.route-authors-head small {
  color: var(--muted);
  font-size: 12px;
}

.route-group-ride-list,
.route-report-list {
  display: grid;
  gap: 18px;
}

.route-group-ride-list article {
  border: 1px solid #e7ecf3;
  border-radius: 7px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 35%);
  padding: 18px;
}

.route-group-ride-list p:not(.meta) {
  line-height: 1.5;
}

.group-participants {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-participants span {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #e2e8f1;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  padding: 5px 9px 5px 5px;
}

.group-participants .avatar {
  height: 24px;
  width: 24px;
}

.route-report-card {
  border: 1px solid #e7ecf3;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.route-report-card header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px 1fr;
}

.route-report-card > p {
  line-height: 1.6;
}

.route-report-photos {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-report-photos img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.route-report-photos a {
  display: block;
}

.route-report-detail {
  display: grid;
  gap: 24px;
}

.route-report-detail-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding-bottom: 22px;
}

.route-report-detail-head .avatar {
  height: 56px;
  width: 56px;
}

.route-report-detail-head h1 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.12;
  margin: 4px 0 8px;
}

.route-report-detail-head a {
  color: var(--blue);
  font-weight: 700;
}

.route-report-gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-report-gallery figure {
  margin: 0;
}

.route-report-gallery a {
  display: block;
}

.route-report-gallery img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.route-report-gallery figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.group-ride-participants {
  display: grid;
  gap: 14px;
}

.group-ride-participants article {
  border: 1px solid #e7ecf3;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px 1fr;
  padding: 14px;
}

.group-ride-participants p:not(.meta) {
  line-height: 1.5;
}

.photo-modal {
  align-items: center;
  background: rgba(4, 12, 28, 0.92);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: fixed;
  z-index: 100000;
}

.photo-modal.is-open {
  display: flex;
}

.photo-modal__dialog {
  display: grid;
  gap: 14px;
  max-height: 100%;
  max-width: min(1120px, 100%);
  width: 100%;
}

.photo-modal__stage {
  align-items: center;
  display: flex;
  justify-content: center;
  position: relative;
}

.photo-modal__image {
  border-radius: 8px;
  display: block;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  width: 100%;
}

.photo-modal__side {
  align-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 600;
  inset-block: 0;
  justify-content: center;
  opacity: 0.86;
  padding: 0;
  position: absolute;
  transition: opacity 0.18s ease, background 0.18s ease;
  width: min(15vw, 118px);
}

.photo-modal__side:hover {
  opacity: 1;
}

.photo-modal__side--prev {
  background: linear-gradient(90deg, rgba(3, 10, 24, 0.68), rgba(3, 10, 24, 0));
  border-radius: 8px 0 0 8px;
  left: 0;
}

.photo-modal__side--next {
  background: linear-gradient(270deg, rgba(3, 10, 24, 0.68), rgba(3, 10, 24, 0));
  border-radius: 0 8px 8px 0;
  right: 0;
}

.photo-modal__bar {
  align-items: center;
  color: #fff;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto auto;
}

.photo-modal__caption {
  font-size: 14px;
  line-height: 1.4;
}

.photo-modal__download,
.photo-modal__close {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
}

.photo-modal__download {
  background: var(--blue);
}

.photo-modal__close {
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.site-footer {
  background:
    url("../images/wave_footer_transparent.png") center -72px / auto 620px no-repeat,
    #00349f;
  color: #fff;
  isolation: isolate;
  margin-top: 0;
  overflow: hidden;
  position: relative;
  margin-top: -200px;
  z-index: -1;
}


.footer-inner {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: auto 1fr auto auto auto;
  margin: 0 auto;
  max-width: 1136px;
  min-height: 360px;
  padding: 260px 24px 32px;
  position: relative;
  z-index: 1;
}

.footer-brand img {
  height: 96px;
  width: 96px;
}

.footer-inner p {
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.45;
  max-width: 330px;
}

.footer-inner nav,
.footer-links {
  display: grid;
  gap: 12px;
}

.footer-inner nav {
  grid-template-columns: repeat(3, auto);
  gap: 14px;
}

.footer-inner nav img {
  display: block;
  height: 28px;
  width: 28px;
}

.footer-links {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
  padding-left: 38px;
}

.footer-inner small {
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    max-width: 100vw;
    overflow: hidden;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
  }

  .main-nav a {
    padding: 0 0 18px;
    white-space: nowrap;
  }

  .dashboard,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 640px;
  }

  .auth-visual {
    min-height: 360px;
  }

  .route-cover {
    min-height: 380px;
  }

  .route-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-stat-grid article:first-child {
    border-radius: 8px 0 0 0;
  }

  .route-stat-grid article:nth-child(2) {
    border-radius: 0 8px 0 0;
  }

  .route-stat-grid article:nth-child(3) {
    border-radius: 0 0 0 8px;
  }

  .route-stat-grid article:last-child {
    border-radius: 0 0 8px 0;
  }

  .route-layout {
    grid-template-columns: 1fr;
  }

  .route-editor-shell {
    grid-template-columns: 1fr;
  }

  .member-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-layout {
    grid-template-columns: 1fr;
  }

  .profile-edit-shell {
    grid-template-columns: 1fr;
  }

  .profile-edit-preview {
    grid-template-columns: 96px 1fr;
  }

  .profile-edit-preview .member-hero-avatar {
    height: 96px;
    width: 96px;
  }

  .stats article:nth-child(2) {
    border-right: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 660px) {
  .site-header {
    gap: 14px;
    padding: 12px 18px 0;
    position: static;
  }

  .brand {
    font-size: 17px;
  }

  .brand img {
    height: 67px;
    margin: -8px 0 -16px;
    transform: translateY(4px);
    width: 67px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .header-actions .btn {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding: 56px 24px 120px;
  }

  .hero h1 {
    font-size: 40px;
    line-height: 1.08;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-actions,
  .stats,
  .dashboard,
  .trip-page .trip-schedule .trip-card,
  .route-layout {
    grid-template-columns: 1fr;
  }

  .trip-page .trip-schedule .trip-card {
    gap: 16px;
    max-width: calc(100vw - 48px);
    width: 100%;
  }

  .trip-page .trip-list {
    max-width: calc(100vw - 48px);
    width: 100%;
  }

  .trip-page .trip-schedule .trip-date {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    height: 44px;
    justify-content: flex-start;
    padding: 0 12px;
    width: 100%;
  }

  .trip-date strong {
    font-size: 22px;
  }

  .trip-route-panel {
    order: 3;
  }

  .trip-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 4;
  }

  .hero-actions {
    align-items: stretch;
    display: grid;
  }

  .content {
    max-width: 100vw;
    overflow-x: hidden;
    padding: 22px 16px 64px;
  }

  .messages {
    max-width: calc(100vw - 24px);
    top: 18px;
  }

  .auth-page {
    padding-top: 18px;
  }

  .auth-shell {
    max-width: calc(100vw - 32px);
  }

  .auth-visual {
    min-height: 300px;
    padding: 24px 20px;
  }

  .auth-visual h1 {
    font-size: 30px;
  }

  .auth-visual p {
    font-size: 15px;
  }

  .auth-visual-stats {
    display: none;
  }

  .auth-panel {
    padding: 24px 16px 22px;
  }

  .auth-head h2 {
    font-size: 29px;
  }

  .social-auth {
    grid-template-columns: 1fr;
  }

  .auth-name-grid {
    grid-template-columns: 1fr;
  }

  .stats article,
  .stats article:nth-child(2) {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    justify-content: start;
    padding-left: 18px;
  }

  .panel {
    min-height: unset;
    padding: 22px 16px;
  }

  .route-cover {
    min-height: 430px;
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }

  .trip-card-head {
    align-items: stretch;
    display: grid;
  }

  .trip-route-link {
    justify-self: start;
  }

  .trip-map,
  .trip-map iframe,
  .trip-map img,
  .trip-map-empty {
    min-height: 260px;
    height: 260px;
  }

  .trip-card-main > p {
    overflow-wrap: anywhere;
  }

  .route-cover-copy,
  .route-section {
    padding: 20px 16px;
  }

  .route-cover-copy {
    max-width: min(310px, calc(100vw - 48px));
  }

  .route-cover-copy h1 {
    font-size: 32px;
    max-width: min(310px, calc(100vw - 64px));
  }

  .route-cover-copy > p {
    font-size: 16px;
    max-width: min(300px, calc(100vw - 64px));
  }

  .route-stat-grid,
  .route-layout {
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }

  .route-stat-grid {
    grid-template-columns: 1fr;
  }

  .route-stat-grid article,
  .route-stat-grid article:first-child,
  .route-stat-grid article:nth-child(2),
  .route-stat-grid article:nth-child(3),
  .route-stat-grid article:last-child {
    border-radius: 8px;
  }

  .route-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-map,
  .route-map > iframe,
  .route-map > img,
  .route-leaflet,
  .route-map-empty {
    min-height: 300px;
    height: 300px;
  }

  .route-map.group-ride-route-map,
  .route-map.group-ride-route-map > iframe,
  .route-map.group-ride-route-map > img,
  .route-map.group-ride-route-map .route-leaflet,
  .route-map.group-ride-route-map .route-map-empty,
  .route-map.group-ride-route-map .leaflet-container {
    min-height: 300px;
    height: 300px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .route-editor-shell {
    max-width: calc(100vw - 32px);
  }

  .route-editor-map {
    height: 420px;
    min-height: 420px;
  }

  .route-riders article {
    grid-template-columns: 40px 1fr;
  }

  .route-riders strong {
    grid-column: 2;
    justify-items: start;
  }

  .route-report-preview article,
  .route-group-ride-list article,
  .route-authors-head {
    grid-template-columns: 1fr;
  }

  .route-authors-head {
    padding: 20px 16px;
  }

  .route-authors-head h1 {
    font-size: 28px;
  }

  .route-report-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-report-detail-head {
    align-items: start;
    grid-template-columns: 44px 1fr;
  }

  .route-report-detail-head .route-section-link {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .report-detail-head {
    grid-template-columns: 1fr;
  }

  .report-form-shell {
    grid-template-columns: 1fr;
    max-width: calc(100vw - 32px);
  }

  .report-editor-field {
    position: static;
  }

  .report-editor .ql-editor {
    height: min(420px, 62vh);
  }

  .report-form-summary,
  .report-form {
    padding: 20px 16px;
  }

  .report-ride-choice-card {
    grid-template-columns: 1fr;
  }

  .report-rich-text iframe,
  .report-editor .ql-editor iframe {
    min-height: 220px;
  }

  .report-gallery-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-gallery-picker {
    padding: 14px;
  }

  .report-gallery-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-photo-edit-modal {
    padding: 14px;
  }

  .report-photo-edit-controls,
  .report-photo-edit-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-detail-cover {
    aspect-ratio: 4 / 3;
  }

  .route-report-detail-head .avatar {
    height: 44px;
    width: 44px;
  }

  .route-report-detail-head h1 {
    font-size: 28px;
  }

  .route-report-gallery {
    grid-template-columns: 1fr;
  }

  .member-hero,
  .member-route-list article,
  .member-ride-card-list article {
    grid-template-columns: 1fr;
  }

  .member-hero {
    justify-items: start;
    padding: 20px 16px;
  }

  .profile-edit-shell {
    max-width: calc(100vw - 32px);
  }

  .trip-form-shell,
  .trip-form-grid,
  .trip-choice-tools,
  .trip-route-choice-list,
  .trip-invite-list {
    grid-template-columns: 1fr;
  }

  .trip-choice-pages {
    justify-content: start;
  }

  .trip-form-shell {
    max-width: calc(100vw - 32px);
  }

  .trip-cancel-form {
    grid-column: 1;
    padding: 0 16px 20px;
  }

  .trip-form-summary,
  .trip-form {
    padding: 20px 16px;
  }

  .group-ride-status-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-ride-route-grid {
    grid-template-columns: 1fr;
  }

  .profile-edit-preview,
  .profile-edit-form {
    padding: 20px 16px;
  }

  .profile-edit-preview,
  .profile-number-grid {
    grid-template-columns: 1fr;
  }

  .avatar-picker {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .avatar-picker-frame {
    height: 72px;
    width: 72px;
  }

  .avatar-modal {
    padding: 12px;
  }

  .avatar-modal-dialog {
    padding: 18px 14px;
  }

  .profile-edit-preview h1 {
    font-size: 28px;
  }

  .member-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-route-list strong,
  .member-ride-card-list strong {
    justify-items: start;
  }

  .photo-modal {
    padding: 14px;
  }

  .photo-modal__bar {
    grid-template-columns: 1fr;
  }

  .photo-modal__download,
  .photo-modal__close {
    width: 100%;
  }

  .photo-modal__side {
    font-size: 48px;
    width: 72px;
  }

  .panel-head {
    align-items: flex-start;
    gap: 14px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .media-list article,
  .report-list article {
    grid-template-columns: 104px 1fr;
  }

  .panel-more {
    margin-left: 0;
  }


  .members article {
    grid-template-columns: 48px 1fr;
  }

  .members strong {
    display: none;
  }

  .footer-inner {
    align-items: start;
    grid-template-columns: 1fr;
    min-height: 500px;
    padding-top: 170px;
  }

  .footer-links {
    border-left: 0;
    padding-left: 0;
  }
}


.bicycle-routes-page { max-width: 1180px; }
.bicycle-route-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.bicycle-route-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 12px; padding: 18px; }
.bicycle-route-card h3 { margin: 0; }
.bicycle-route-card p { color: var(--muted); margin: 0; }
.bicycle-route-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.bicycle-route-stats span { background: #eef4ff; border-radius: 6px; color: var(--blue); font-family: var(--font-heading); font-size: 13px; font-weight: 700; padding: 7px 10px; }
.route-editor-screen { overflow: hidden; }
.route-editor-screen main { flex: 0 0 auto; min-height: 0; }
.route-editor-screen .site-footer { display: none; }
.bicycle-planner-page { height: calc(100vh - 88px); height: calc(100dvh - 88px); min-height: 0; overflow: hidden; }
.bicycle-planner { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: 100%; min-height: 0; }
.route-editor-screen .bicycle-planner { grid-template-columns: minmax(0, 1fr) 320px 380px; }
.bicycle-map-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.bicycle-map { background: #e8eef5; height: 100%; min-height: 0; width: 100%; }
.route-map-focus-control { display: grid; }
.route-map-focus-control button { align-items: center; background: #fff; border: 0; border-bottom: 1px solid #ccc; color: #1f2a3d; cursor: pointer; display: flex; font-family: var(--font-heading); font-size: 18px; font-weight: 800; height: 30px; justify-content: center; line-height: 1; padding: 0; width: 30px; }
.route-map-focus-control button:last-child { border-bottom: 0; font-size: 18px; }
.route-map-focus-control button:hover { background: #f2f5f8; color: #0b62ee; }
.bicycle-map-actions { align-items: center; background: #fff; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; min-height: 66px; padding: 12px 18px; }
.bicycle-map-actions .btn { background: #f5f8fc; border: 1px solid #b9c5d4; color: #1f2a3d; }
.bicycle-map-actions .btn:hover { background: #e9eff7; border-color: #8293aa; }
.bicycle-map-actions .btn-blue { background: linear-gradient(180deg, #0b62ee, #0034b1); border-color: #0034b1; color: #fff; }
.bicycle-map-actions .btn-red { background: linear-gradient(180deg, #ff302d, #dc1115); border-color: #dc1115; color: #fff; }
.bicycle-map-actions .btn:disabled,
.bicycle-map-actions .btn[disabled] { background: #d9e1ec; border: 1px solid #9aa8ba; color: #334155; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.bicycle-map-actions span { color: var(--muted); flex: 1 1 240px; font-size: 13px; }
.bicycle-map-actions .map-toggle { align-items: center; background: #f5f8fc; border: 1px solid #b9c5d4; border-radius: 6px; color: #1f2a3d; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 600; gap: 7px; min-height: 38px; padding: 8px 10px; }
.bicycle-map-actions .map-toggle input { accent-color: #0b62ee; margin: 0; }
.bicycle-map-actions .map-toggle span { color: inherit; flex: 0 0 auto; font-size: inherit; }
.route-hidden-file-input { height: 1px; overflow: hidden; position: absolute; width: 1px; }
.route-hidden-file-input input { opacity: 0; pointer-events: none; position: absolute; }
.route-photo-field { display: grid; gap: 9px; }
.route-photo-field > span { color: var(--ink); font-family: var(--font-heading); font-size: 14px; font-weight: 700; }
.route-photo-preview { align-items: center; aspect-ratio: 118 / 43; background: #eef4ff; border: 1px solid #cfd8e5; border-radius: 8px; color: #596170; display: flex; justify-content: center; overflow: hidden; width: 100%; }
.route-photo-preview img { display: block; height: 100%; object-fit: cover; width: 100%; }
.route-photo-preview strong { font-size: 13px; }
.route-photo-actions { display: flex; gap: 8px; }
.route-photo-actions .btn { background: linear-gradient(180deg, #0b62ee, #0034b1); border-color: #0034b1; color: #fff; box-shadow: 0 8px 18px rgba(11, 98, 238, .22); }
.route-photo-actions .btn:hover { background: linear-gradient(180deg, #1b70ff, #0742c8); border-color: #0034b1; }
.route-photo-modal[hidden] { display: none; }
.route-photo-modal { align-items: center; background: rgba(6, 18, 38, .62); display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 2000; }
.route-photo-modal__panel { background: #fff; border-radius: 8px; box-shadow: 0 24px 70px rgba(6, 18, 38, .35); display: grid; gap: 14px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); max-width: 940px; overflow: auto; padding: 18px; width: min(940px, 100%); }
.route-photo-modal__head { align-items: center; display: flex; justify-content: space-between; }
.route-photo-modal__head strong { color: var(--ink); font-family: var(--font-heading); font-size: 20px; }
.route-photo-modal__head button { align-items: center; background: #f5f8fc; border: 1px solid #cfd8e5; border-radius: 6px; color: #1f2a3d; cursor: pointer; display: inline-flex; font-size: 24px; height: 36px; justify-content: center; line-height: 1; width: 36px; }
.route-photo-cropper { aspect-ratio: 118 / 43; background: #101827; border-radius: 8px; cursor: grab; overflow: hidden; position: relative; width: 100%; }
.route-photo-cropper.is-dragging { cursor: grabbing; }
.route-photo-cropper::after { border: 2px solid rgba(255, 255, 255, .86); box-shadow: inset 0 0 0 1px rgba(6, 18, 38, .28); content: ""; inset: 0; pointer-events: none; position: absolute; }
.route-photo-cropper img { left: 50%; max-width: none; position: absolute; top: 50%; transform-origin: center; user-select: none; will-change: transform; }
.route-photo-zoom { align-items: center; display: grid; gap: 8px; grid-template-columns: 90px minmax(0, 1fr); }
.route-photo-zoom span { color: #334155; font-family: var(--font-heading); font-size: 13px; font-weight: 700; }
.route-photo-zoom input { accent-color: #0b62ee; width: 100%; }
.route-photo-modal__actions { display: flex; gap: 10px; justify-content: end; }
.bicycle-track-panel { background: #fbfcfe; border-left: 1px solid var(--line); display: grid; gap: 14px; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; overflow: hidden; overscroll-behavior: contain; padding: 18px; }
.bicycle-side-panel { align-content: start; background: #fff; border-left: 1px solid var(--line); display: grid; gap: 14px; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px; }
.bicycle-side-panel h1 { font-size: 30px; margin: 0; }
.bicycle-side-panel label { display: grid; gap: 7px; }
.bicycle-side-panel input:not([type="checkbox"]), .bicycle-side-panel textarea, .bicycle-side-panel select { border: 1px solid var(--line); border-radius: 6px; font: inherit; min-height: 42px; padding: 9px 11px; width: 100%; }
.bicycle-stat-panel { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.bicycle-stat-panel article { background: #f7f9fc; border: 1px solid #e7ecf3; border-radius: 7px; display: grid; gap: 4px; padding: 10px; }
.bicycle-stat-panel span { color: var(--muted); font-size: 12px; }
.bicycle-stat-panel strong { color: var(--ink); font-family: var(--font-heading); font-size: 18px; }
.bicycle-stat-panel input,
.bicycle-stat-panel textarea,
.bicycle-stat-panel select { display: none; }
.checkbox-row { align-items: center; display: flex !important; gap: 9px !important; }
.round-trip-box { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 10px; padding: 12px; }
.elevation-chart { background: #fff; border: 1px solid var(--line); border-radius: 8px; max-height: 190px; padding: 8px; width: 100%; }
.route-elevation-label { background: #fff; border: 2px solid #1f2a3d; border-radius: 6px; box-shadow: 0 5px 14px rgba(16, 24, 39, .22); color: #101827; font-family: var(--font-heading); font-size: 12px; font-weight: 800; line-height: 1; padding: 6px 8px; white-space: nowrap; width: max-content !important; }
.route-elevation-label--climb { border-color: #dc1115; color: #9f1114; }
.route-elevation-label--descent { border-color: #0b62ee; color: #0037b7; }
.route-surface-legend { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.route-surface-legend span { align-items: center; color: #334155; display: inline-flex; font-size: 12px; gap: 6px; }
.route-surface-legend i { border: 1px solid rgba(31, 42, 61, .25); border-radius: 999px; display: inline-block; height: 9px; width: 22px; }
.route-surface-legend .surface-asphalt { background: #ffcc00; }
.route-surface-legend .surface-gravel { background: #7c3aed; }
.route-surface-legend .surface-dirt { background: #2f8f46; }
.route-surface-legend .surface-unknown { background: #94a3b8; }
.bicycle-detail-map { background: #e8eef5; border-radius: 8px; height: 540px; margin: 22px 0; overflow: hidden; width: 100%; }
@media (max-width: 980px) {
  .bicycle-planner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(180px, 40vh); grid-template-rows: minmax(0, 1fr) minmax(180px, 40dvh); }
  .route-editor-screen .bicycle-planner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(180px, 34vh) minmax(180px, 40vh); grid-template-rows: minmax(0, 1fr) minmax(180px, 34dvh) minmax(180px, 40dvh); }
  .bicycle-track-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; order: 2; overflow: auto; }
  .bicycle-side-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; order: 2; overflow: auto; }
  .route-editor-screen .bicycle-side-panel { order: 3; }
  .bicycle-map-wrap { min-height: 0; }
  .bicycle-map { height: 100%; min-height: 0; }
}
@media (max-width: 620px) {
  .bicycle-track-panel { padding: 16px; }
  .bicycle-side-panel { padding: 16px; }
  .bicycle-stat-panel { grid-template-columns: 1fr; }
  .bicycle-detail-map { height: 360px; }
}

.waypoint-panel { background: #f7f9fc; border: 1px solid #cfd8e5; border-radius: 8px; display: grid; gap: 10px; grid-template-rows: auto minmax(0, 1fr); min-height: 140px; overflow: hidden; padding: 12px; }
.waypoint-panel > strong { color: #1f2a3d; font-family: var(--font-heading); font-size: 14px; }
.waypoint-panel ol { align-content: start; display: grid; gap: 8px; list-style: none; margin: 0; min-height: 0; overflow: auto; padding: 0; }
.waypoint-panel li { align-items: center; background: #fff; border: 1px solid #d8e0eb; border-radius: 7px; display: grid; gap: 7px; grid-template-columns: minmax(0, 1fr) repeat(3, 30px); padding: 8px; }
.waypoint-panel li.waypoint-empty { background: linear-gradient(180deg, #fff, #f1f6ff); border-color: #b8c9e4; color: #334155; display: grid; font-size: 13px; gap: 8px; grid-template-columns: 1fr; line-height: 1.4; padding: 14px; }
.waypoint-panel li.waypoint-empty b { color: #0037b7; font-family: var(--font-heading); font-size: 15px; }
.waypoint-panel li.waypoint-empty span { display: block; }
.waypoint-panel button { align-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.waypoint-panel small { color: #596170; display: grid; gap: 2px; min-width: 0; overflow: hidden; }
.waypoint-panel small b { color: #0037b7; font-size: 12px; }
.waypoint-panel small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
