:root {
  --bg: #0f172a;
  --bg-soft: #111c34;
  --surface: #16223d;
  --surface-2: #1d2b4b;
  --text: #e5ecf6;
  --text-soft: #9db1cf;
  --border: rgba(157, 177, 207, 0.18);
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #0b1223 0%, #0f172a 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.page-shell {
  padding: 32px 0 48px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 35, 0.72);
  border-bottom: 1px solid var(--border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: var(--shadow);
}

.top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.top-nav a {
  color: var(--text);
}

.button {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
  border-color: rgba(96, 165, 250, 0.5);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border-color: transparent;
}

.button-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.button-small {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(22, 34, 61, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
  box-shadow: var(--shadow);
}

.hero-home {
  margin-bottom: 32px;
}

.hero-slim {
  margin-bottom: 24px;
}

.hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.hero-text {
  margin: 0;
  max-width: 70ch;
  color: var(--text-soft);
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card,
.card {
  background: rgba(22, 34, 61, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 22px;
}

.compact-card {
  padding: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.compact-stack {
  gap: 10px;
}

.section-block {
  margin-top: 28px;
}

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

.section-head-tight {
  margin-bottom: 14px;
}

.section-head h2,
.card h2,
.card h3,
.card h4 {
  margin: 0 0 4px;
}

.feature-list,
.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li,
.footer-links a {
  display: block;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--text);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.stats-grid,
.facts-grid {
  display: grid;
  gap: 12px;
}

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

.facts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-item,
.fact-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 177, 207, 0.12);
}

.stat-item strong,
.fact-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
}

.muted {
  color: var(--text-soft);
}

.small-text {
  font-size: 0.92rem;
}

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

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.notice-info {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.24);
}

.notice-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
}

.notice-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
}

.notice-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.24);
}

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

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

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

.form-grid-route {
  margin-top: 14px;
}

.compact-notice {
  margin-bottom: 14px;
}

.route-result-card {
  margin-top: 16px;
}

.route-result-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(157, 177, 207, 0.18);
  border-radius: 12px;
  background: rgba(11, 18, 35, 0.72);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

textarea {
  resize: vertical;
}

.form-feedback {
  min-height: 24px;
  margin-top: 12px;
  font-size: 0.95rem;
}

.form-feedback.error {
  color: #fca5a5;
}

.form-feedback.success {
  color: #86efac;
}

.badge,
.status-badge,
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.badge-active {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.badge-draft {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.badge-archived {
  background: rgba(157, 177, 207, 0.12);
  border-color: rgba(157, 177, 207, 0.25);
  color: #cbd5e1;
}

.badge-admin {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
  color: #dbeafe;
}

.badge-setter {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.28);
  color: #e9d5ff;
}

.badge-superadmin {
  background: rgba(236, 72, 153, 0.14);
  border-color: rgba(236, 72, 153, 0.28);
  color: #fbcfe8;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.badge-counter {
  min-width: 30px;
  justify-content: center;
}

.route-card,
.gym-card,
.sector-card {
  display: grid;
  gap: 14px;
}

.route-card header,
.gym-card header,
.sector-block header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.route-meta,
.link-row,
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prose {
  line-height: 1.7;
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.comment-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 177, 207, 0.12);
}

.comment-card .comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.qr-box {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.qr-preview {
  display: inline-flex;
  padding: 14px;
  background: white;
  border-radius: 18px;
}

.qr-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.qr-asset {
  display: grid;
  gap: 10px;
  align-items: start;
}

.qr-asset-head {
  display: grid;
  gap: 4px;
}

.print-card-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(18, 23, 32, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.print-card-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.media-manager-preview {
  --preview-aspect: 1 / 1;
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: var(--preview-aspect);
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(18, 23, 32, 0.08);
}

.media-manager-preview--square {
  --preview-aspect: 1 / 1;
}

.media-manager-preview--landscape {
  --preview-aspect: 16 / 9;
}

.media-manager-preview--gallery {
  --preview-aspect: 4 / 3;
}

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

.media-gallery-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.route-result-assets {
  width: 100%;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 18px;
  background: #020617;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 60vh;
}

.auth-card {
  width: min(100%, 560px);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 48px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(157, 177, 207, 0.22);
  border-radius: 16px;
  color: var(--text-soft);
}

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(157, 177, 207, 0.08), rgba(157, 177, 207, 0.18), rgba(157, 177, 207, 0.08));
  background-size: 200% 100%;
  animation: pulse 1.6s infinite;
}

.skeleton-line {
  height: 16px;
}

.skeleton-line.short {
  width: 62%;
}

.route-layout {
  align-items: start;
}

.gym-shell {
  display: grid;
  gap: 16px;
}

.gym-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(22, 34, 61, 0.92);
  box-shadow: var(--shadow);
  padding: 24px;
}

.gym-panel header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.gym-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(157, 177, 207, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.data-item strong {
  display: block;
  margin-bottom: 6px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-card {
  gap: 14px;
}

.notification-card h3 {
  margin: 8px 0 0;
}

.notification-card-unread {
  border-color: rgba(96, 165, 250, 0.36);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14), var(--shadow);
}

@keyframes pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3,
  .gym-panel-grid,
  .form-grid,
  .form-grid-3,
  .route-result-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid,
  .topbar,
  .section-head,
  .route-card header,
  .gym-card header,
  .sector-block header,
  .gym-panel header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-top: 20px;
  }

  .hero,
  .gym-panel,
  .card {
    padding: 18px;
  }

  .facts-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* --- v4 additions: mobile-first route page, modal editor, QR save actions --- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
}

input,
select,
textarea {
  min-height: 44px;
}

textarea {
  min-height: 112px;
}

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

.actions-grid > .button,
.actions-grid-mobile > .button,
.actions-grid > a.button,
.actions-grid-mobile > a.button {
  width: 100%;
}

.full-width-mobile {
  width: 100%;
}

.is-active {
  border-color: rgba(96, 165, 250, 0.55) !important;
  background: rgba(96, 165, 250, 0.16) !important;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.08);
}

.video-card {
  gap: 14px;
}

.video-card .video-frame,
.video-card .notice,
.video-card .empty-state {
  margin-top: 4px;
}

.moderation-grid {
  align-items: start;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .route-layout {
    grid-template-columns: 1fr;
  }

  .actions-grid,
  .actions-grid-mobile {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    width: min(100%, 760px);
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 20px), var(--container));
  }

  .topbar {
    min-height: unset;
    padding: 14px 0;
    gap: 14px;
  }

  .top-nav {
    width: 100%;
    gap: 10px;
  }

  .top-nav > a,
  .top-nav > button,
  .top-nav > span {
    width: 100%;
  }

  .top-nav > span {
    justify-content: center;
  }

  .button,
  .card-actions > .button,
  .card-actions > a.button,
  .actions-row > .button,
  .actions-row > a.button {
    width: 100%;
  }

  .comment-card .comment-head,
  .modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .route-card header,
  .gym-panel header {
    gap: 12px;
  }

  .qr-preview {
    width: 100%;
    justify-content: center;
  }

  .qr-preview img {
    width: min(100%, 240px);
    height: auto;
  }

  .modal {
    padding: 0;
    place-items: stretch;
  }

  .modal-dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    padding: 16px;
  }

  .form-grid-route,
  .form-grid,
  .form-grid-3,
  .stats-grid,
  .facts-grid,
  .gym-panel-grid,
  .route-result-grid,
  .actions-grid,
  .actions-grid-mobile {
    grid-template-columns: 1fr;
  }
}


/* --- v6 additions: real index landing with inline auth --- */
.hero-entry {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
}

.hero-entry-copy {
  display: grid;
  gap: 16px;
}

.compact-grid {
  gap: 12px;
}

.top-gap {
  margin-top: 8px;
}

.top-gap-small {
  margin-top: 12px;
}

.no-margin {
  margin: 0;
}

.landing-auth-card {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 92px;
}

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

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

.auth-tab {
  min-height: 46px;
}

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

.auth-panel {
  display: block;
}

.feature-card {
  min-height: 100%;
}

#landing-auth-user-text .role-badge {
  margin-left: 8px;
}

@media (max-width: 980px) {
  .hero-entry {
    grid-template-columns: 1fr;
  }

  .landing-auth-card {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .auth-tabs {
    grid-template-columns: 1fr;
  }
}

/* --- v7 additions: email verification + password reset flows --- */
.auth-flow-stack {
  display: grid;
  gap: 14px;
}

.auth-step-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(11, 18, 35, 0.58);
}

.auth-step-card h3 {
  margin: 0;
}

.auth-step-card .eyebrow {
  justify-self: start;
}

.auth-step-card strong {
  color: var(--text);
}

.auth-card .form-feedback:last-child {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .auth-step-card {
    padding: 14px;
  }
}

/* --- v10 additions: public profiles for setters and venues --- */
.venue-hero,
.setter-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
}

.venue-hero-copy,
.setter-hero-copy {
  display: grid;
  gap: 12px;
}

.member-card {
  min-height: 100%;
}

.member-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.24);
  flex: 0 0 64px;
}

.avatar-image,
.avatar-showcase-image,
.public-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder,
.avatar-showcase-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 800;
  color: #bfdbfe;
}

.avatar-card {
  padding: 14px;
}

.avatar-showcase {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(157, 177, 207, 0.14);
}

.public-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(157, 177, 207, 0.14);
}

.public-cover img {
  display: block;
}

@media (max-width: 980px) {
  .venue-hero,
  .setter-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .member-card-head {
    align-items: flex-start;
  }
}

.setter-profile-hero {
  align-items: start;
}

.setter-hero-main {
  min-width: 0;
}

.setter-hero-side {
  min-width: 280px;
}

.wrap-gap {
  flex-wrap: wrap;
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.trophy-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.24);
}

.trophy-pill-icon {
  font-size: 1.05rem;
}

.trophy-card {
  border-color: rgba(250, 204, 21, 0.18);
}

.trophy-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.trophy-big {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.22);
  font-size: 1.5rem;
}

.trophy-card-city .trophy-big {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.22);
}

.trophy-card-country .trophy-big {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.rank-card {
  min-height: 190px;
}

.rank-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin: 12px 0 10px;
}

.leaderboard-filters-card {
  margin-bottom: 16px;
}

.leaderboard-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.leaderboard-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-card {
  min-height: 100%;
}

.leaderboard-list {
  gap: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(157, 177, 207, 0.12);
}

.leaderboard-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.leaderboard-row-top {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.08), transparent);
  border-radius: 14px;
  padding: 12px;
}

.leaderboard-row-top:first-child {
  padding-top: 12px;
}

.leaderboard-rank {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.leaderboard-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-copy a {
  font-weight: 600;
}

@media (max-width: 980px) {
  .setter-profile-hero {
    grid-template-columns: 1fr;
  }

  .leaderboard-filters {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }
}

/* --- v13 additions: ClimbScan branded home + public venue filters --- */
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-brand {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(22, 34, 61, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.brand-hero-copy {
  display: grid;
  gap: 18px;
}

.brand-hero-actions {
  align-items: stretch;
}

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

.brand-metric-card {
  min-height: 100%;
  display: grid;
  gap: 6px;
}

.brand-metric-card strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.metric-accent-blue {
  border-color: rgba(96, 165, 250, 0.28);
}

.metric-accent-green {
  border-color: rgba(34, 197, 94, 0.28);
}

.metric-accent-purple {
  border-color: rgba(168, 85, 247, 0.28);
}

.metric-accent-gold {
  border-color: rgba(250, 204, 21, 0.24);
}

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

.story-card,
.flow-card {
  min-height: 100%;
}

.brand-auth-card {
  border-color: rgba(96, 165, 250, 0.22);
}

.climbscan-flow-grid {
  align-items: stretch;
}

.venue-card-glow {
  background:
    linear-gradient(180deg, rgba(22, 34, 61, 0.92) 0%, rgba(18, 28, 52, 0.92) 100%);
}

.venue-hero-brand {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(250, 204, 21, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(22, 34, 61, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
}

.venue-filter-card {
  border-color: rgba(96, 165, 250, 0.2);
}

.venue-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.venue-filter-search {
  grid-column: 1 / -1;
}

#route-filter-summary {
  min-height: 32px;
}

@media (max-width: 1180px) {
  .grid-4,
  .brand-story-grid,
  .venue-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .brand-summary-grid,
  .brand-story-grid,
  .grid-4,
  .venue-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* --- v14 additions: stronger mobile-first QR route card --- */
.route-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 380px);
  align-items: stretch;
}

.route-hero-copy,
.route-hero-side,
.route-primary-column,
.route-secondary-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-flow-grid {
  align-items: start;
}

.route-primary-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-primary-chip {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(157, 177, 207, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 6px;
}

.route-primary-chip-emphasis {
  border-color: rgba(96, 165, 250, 0.3);
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(96, 165, 250, 0.08));
}

.route-primary-chip-label {
  color: var(--text-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.route-primary-chip strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

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

.route-jump-link {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(157, 177, 207, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.route-jump-link:hover {
  border-color: rgba(96, 165, 250, 0.32);
  text-decoration: none;
  transform: translateY(-1px);
}

.route-jump-link-title {
  font-weight: 700;
}

.route-overview-stats,
.route-setter-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.route-overview-stat {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 177, 207, 0.12);
  display: grid;
  gap: 6px;
}

.route-overview-stat strong {
  font-size: 1.4rem;
  line-height: 1;
}

.setter-spotlight {
  display: grid;
  gap: 14px;
}

.setter-spotlight-avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.min-width-0 {
  min-width: 0;
}

.related-routes-grid {
  display: grid;
  gap: 14px;
}

.related-route-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(157, 177, 207, 0.12);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 12px;
}

.related-route-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.related-route-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.route-highlight-card {
  border-color: rgba(96, 165, 250, 0.2);
}

.route-sticky-dock {
  display: none;
}

.route-bottom-spacer {
  display: none;
}

@media (max-width: 1180px) {
  .route-primary-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .route-hero,
  .route-flow-grid,
  .route-jump-grid,
  .route-overview-stats,
  .route-setter-metrics {
    grid-template-columns: 1fr;
  }

  .route-hero-side {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .route-hero {
    padding-bottom: 22px;
  }

  .route-primary-chips,
  .route-jump-grid,
  .route-overview-stats,
  .route-setter-metrics {
    grid-template-columns: 1fr;
  }

  .route-primary-chip,
  .route-jump-link,
  .related-route-card {
    border-radius: 16px;
  }

  .route-sticky-dock {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 40;
  }

  .route-sticky-dock-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: rgba(11, 18, 35, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
  }

  .route-sticky-link {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 10px 8px;
    text-align: center;
    border-radius: 14px;
    border: 1px solid rgba(157, 177, 207, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.8rem;
  }

  .route-sticky-link strong {
    font-size: 0.84rem;
    line-height: 1;
  }

  .route-sticky-link span {
    color: var(--text-soft);
    line-height: 1.1;
  }

  .route-bottom-spacer {
    display: block;
    height: 94px;
  }
}


/* --- v15 additions: even stronger mobile UX for QR route page --- */
.route-panel-card,
#video-section,
#community-section,
#user-videos-section,
#chat-section,
#passport-section,
#related-routes-section,
#share-section {
  scroll-margin-top: 124px;
}

.route-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-panel-toggle {
  display: none;
}

.route-inline-toggle,
.route-list-toggle {
  justify-content: center;
}

.route-list-toggle {
  width: 100%;
  margin-top: 6px;
}

.route-sticky-link.is-active {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.12);
}

.route-mobile-context {
  display: none;
}

.route-mobile-context-button.is-active {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(96, 165, 250, 0.16);
}

@media (max-width: 640px) {
  .route-panel-card {
    padding: 18px;
  }

  .route-panel-card .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .route-panel-card .section-head > div {
    width: 100%;
  }

  .route-panel-card .section-head p {
    display: none;
  }

  .route-panel-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(157, 177, 207, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 600;
  }

  .route-panel-toggle-meta {
    min-width: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    text-align: left;
  }

  .route-panel-toggle-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .route-panel-toggle-chevron {
    display: inline-block;
    transition: transform 0.18s ease;
  }

  .route-panel-card.is-open .route-panel-toggle-chevron {
    transform: rotate(180deg);
  }

  .route-inline-toggle {
    display: inline-flex;
    width: 100%;
  }

  .route-mobile-context {
    display: block;
    position: fixed;
    top: 76px;
    left: 10px;
    right: 10px;
    z-index: 35;
  }

  .route-mobile-context-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: rgba(11, 18, 35, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
  }

  .route-mobile-context-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
  }

  .route-mobile-context-copy strong,
  .route-mobile-context-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .route-mobile-context-copy span {
    color: var(--text-soft);
    font-size: 0.8rem;
  }

  .route-mobile-context-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  .route-mobile-context-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
  }

  .route-mobile-context-button:hover {
    transform: none;
  }

  .route-panel-card,
  #video-section,
  #community-section,
  #user-videos-section,
  #chat-section,
  #passport-section,
  #related-routes-section,
  #share-section {
    scroll-margin-top: 154px;
  }
}


/* --- v18 additions: unified light design system across all pages --- */
:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --bg-soft: #fbfbfc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: #ffffff;
  --surface-muted: #f4f4f5;
  --surface-emphasis: #eef8f4;
  --text: #1f2328;
  --text-soft: #667085;
  --heading: #111827;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --accent: #10a37f;
  --accent-strong: #0f8b6d;
  --accent-soft: rgba(16, 163, 127, 0.12);
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.05);
  --container: 1220px;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  background:
    radial-gradient(circle at top left, rgba(16, 163, 127, 0.06), transparent 24%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 22%),
    linear-gradient(180deg, #fbfbfc 0%, #f4f5f6 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: auto;
  z-index: -1;
  filter: blur(14px);
}

body::before {
  top: -120px;
  left: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(16, 163, 127, 0.08);
}

body::after {
  right: -90px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.05);
}

::selection {
  background: rgba(16, 163, 127, 0.18);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  letter-spacing: -0.02em;
}

strong {
  color: var(--heading);
}

p {
  margin-top: 0;
}

a {
  color: var(--accent-strong);
}

 a:hover {
  color: #0d6f59;
}

img {
  display: block;
}

.page-shell {
  position: relative;
  padding: 36px 0 56px;
}

.site-header {
  background: rgba(248, 248, 249, 0.84);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 80px;
  padding: 12px 0;
}

.brand {
  color: var(--heading);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2fc5a0);
  box-shadow: 0 14px 28px rgba(16, 163, 127, 0.18);
}

.top-nav {
  gap: 10px;
}

.top-nav > a,
.top-nav > button,
.top-nav > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.top-nav > a:hover,
.top-nav > button:hover,
.top-nav > span:hover {
  text-decoration: none;
  color: var(--heading);
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
}

.top-nav > span.badge,
.top-nav > span.role-badge,
.top-nav > span.badge-admin,
.top-nav > span.badge-setter,
.top-nav > span.badge-superadmin {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--heading);
  box-shadow: var(--shadow-soft);
}

.button:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(16, 163, 127, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.12);
}

.button-primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #1ab18b);
  box-shadow: 0 16px 30px rgba(16, 163, 127, 0.18);
}

.button-primary:hover {
  color: white;
  border-color: transparent;
}

.button-danger {
  color: #b42318;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.14);
  box-shadow: none;
}

.hero,
.hero-card,
.card,
.gym-panel,
.modal-dialog,
.auth-step-card,
.route-panel-card,
.route-sticky-dock-inner,
.route-mobile-context-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.93));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 30px;
  padding: 34px;
}

.hero::before,
.card::before,
.gym-panel::before,
.modal-dialog::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 163, 127, 0.08), transparent 70%);
  pointer-events: none;
}

.hero > *,
.card > *,
.gym-panel > *,
.modal-dialog > * {
  position: relative;
  z-index: 1;
}

.hero-brand,
.venue-hero-brand,
.route-hero {
  background:
    radial-gradient(circle at top right, rgba(16, 163, 127, 0.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 249, 0.94));
}

.hero-home,
.hero-slim,
.setter-profile-hero,
.venue-hero,
.hero-entry {
  border-radius: 32px;
}

.hero h1 {
  color: var(--heading);
  letter-spacing: -0.035em;
}

.hero-text {
  color: var(--text-soft);
  font-size: 1.02rem;
}

.eyebrow {
  background: rgba(16, 163, 127, 0.09);
  border-color: rgba(16, 163, 127, 0.16);
  color: var(--accent-strong);
}

.badge,
.status-badge,
.role-badge {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--heading);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.badge-active {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.16);
  color: #166534;
}

.badge-draft {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.16);
  color: #9a3412;
}

.badge-archived {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.badge-admin {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.badge-setter {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.16);
  color: #6d28d9;
}

.badge-superadmin {
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.16);
  color: #be185d;
}

.badge-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.16);
  color: #b42318;
}

.feature-list li,
.footer-links a,
.route-jump-link,
.related-route-card,
.comment-card,
.data-item,
.route-primary-chip,
.route-overview-stat,
.auth-step-card,
.route-panel-toggle,
.route-sticky-link,
.route-mobile-context-button,
.avatar-showcase,
.public-cover,
.stat-item,
.fact-item {
  background: rgba(248, 248, 249, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.feature-list li {
  position: relative;
  padding-left: 24px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 163, 127, 0.8);
  box-shadow: 0 0 0 5px rgba(16, 163, 127, 0.12);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--heading);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.96);
}

.stat-item,
.fact-item,
.comment-card,
.data-item,
.route-primary-chip,
.route-overview-stat,
.related-route-card,
.route-jump-link,
.auth-step-card,
.route-panel-toggle,
.route-sticky-link,
.route-mobile-context-button,
.empty-state,
.avatar-showcase,
.public-cover,
.leaderboard-rank,
.notification-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.route-primary-chip-emphasis,
.route-highlight-card,
.notification-card-unread,
.brand-auth-card,
.venue-filter-card {
  border-color: rgba(16, 163, 127, 0.18);
}

.route-primary-chip-emphasis {
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.12), rgba(16, 163, 127, 0.05));
}

.notice {
  background: rgba(255, 255, 255, 0.86);
}

.notice-info {
  background: rgba(16, 163, 127, 0.08);
  border-color: rgba(16, 163, 127, 0.16);
  color: #0f5c49;
}

.notice-warning {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.16);
  color: #9a3412;
}

.notice-success {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.16);
  color: #166534;
}

.notice-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.16);
  color: #b42318;
}

label {
  color: var(--text-soft);
  font-weight: 500;
}

input,
textarea,
select {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: var(--heading);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #98a2b3;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(16, 163, 127, 0.18);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(16, 163, 127, 0.36);
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.12);
  background: #ffffff;
}

.form-feedback.error {
  color: #b42318;
}

.form-feedback.success {
  color: #166534;
}

.qr-preview {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.video-frame {
  background: #eef2f4;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.section-divider {
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.14), transparent);
}

.site-footer {
  margin-top: 28px;
  background: rgba(248, 248, 249, 0.74);
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.footer-grid {
  padding-top: 10px;
}

.empty-state {
  background: rgba(255, 255, 255, 0.62);
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.08);
}

.skeleton {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.09), rgba(15, 23, 42, 0.04));
}

.gym-panel,
.modal-dialog,
.landing-auth-card,
.auth-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 248, 249, 0.95));
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.18);
}

.auth-shell {
  min-height: calc(100vh - 240px);
}

.avatar-circle {
  background: rgba(16, 163, 127, 0.1);
  border-color: rgba(16, 163, 127, 0.18);
}

.avatar-placeholder,
.avatar-showcase-placeholder {
  color: var(--accent-strong);
}

.trophy-pill {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.16);
}

.trophy-card {
  border-color: rgba(245, 158, 11, 0.14);
}

.trophy-big {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.18);
}

.trophy-card-city .trophy-big {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.18);
}

.trophy-card-country .trophy-big {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.18);
}

.leaderboard-row {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.leaderboard-row-top {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
}

.leaderboard-rank {
  background: #ffffff;
}

.venue-card-glow {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.93));
}

.route-jump-link,
.related-route-card,
.route-overview-stat,
.route-primary-chip,
.comment-card,
.data-item {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.route-jump-link:hover,
.related-route-card:hover,
.comment-card:hover,
.data-item:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 163, 127, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.route-sticky-dock-inner,
.route-mobile-context-inner {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.route-sticky-link,
.route-panel-toggle,
.route-mobile-context-button {
  color: var(--heading);
  background: rgba(248, 248, 249, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.route-sticky-link span,
.route-mobile-context-copy span,
.route-panel-toggle-meta {
  color: var(--text-soft);
}

.route-sticky-link.is-active,
.route-mobile-context-button.is-active {
  border-color: rgba(16, 163, 127, 0.22) !important;
  background: rgba(16, 163, 127, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.route-mobile-context-button:hover {
  background: #ffffff;
}

.is-active {
  border-color: rgba(16, 163, 127, 0.34) !important;
  background: rgba(16, 163, 127, 0.08) !important;
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.08);
}

.notification-card-unread {
  border-color: rgba(16, 163, 127, 0.24);
  box-shadow: 0 0 0 1px rgba(16, 163, 127, 0.08), var(--shadow-soft);
}

.hero-media-image {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
  background: #eef2f4;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cover-media-image {
  aspect-ratio: 16 / 10;
}

.profile-media-image {
  aspect-ratio: 1 / 1;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.04);
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.75);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

@media (max-width: 980px) {
  .hero {
    padding: 28px;
  }

  .topbar {
    min-height: unset;
  }
}

@media (max-width: 640px) {
  body::before,
  body::after {
    opacity: 0.65;
  }

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

  .hero,
  .card,
  .gym-panel,
  .modal-dialog {
    border-radius: 22px;
  }

  .hero {
    padding: 22px;
  }

  .site-header {
    backdrop-filter: blur(14px);
  }

  .top-nav > a,
  .top-nav > button,
  .top-nav > span {
    min-height: 44px;
  }

  .footer-links a {
    width: 100%;
    justify-content: center;
  }

  .route-sticky-dock-inner,
  .route-mobile-context-inner {
    border-radius: 20px;
  }
}

/* --- v19 additions: venue news feed + dashboard news manager --- */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label > input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.checkbox-label > span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

.news-card,
.news-manager-card {
  overflow: hidden;
}

.news-card-pinned,
.news-manager-card-pinned {
  border-color: rgba(22, 163, 74, 0.24);
}

.news-card-cover,
.news-manager-card-cover {
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-muted);
}

.news-card-cover img,
.news-manager-card-cover img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.news-card {
  display: grid;
  gap: 18px;
}

.news-card-content,
.news-manager-card-body {
  display: grid;
  gap: 14px;
}

.news-card-head {
  display: grid;
  gap: 10px;
}

.news-card-head h3,
.news-manager-card h4 {
  margin: 0;
  line-height: 1.2;
}

.news-card-body {
  display: grid;
  gap: 12px;
}

.news-card-body p {
  margin: 0;
}

.news-card .badge a,
.news-manager-card .badge a {
  color: inherit;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.news-card-footer .meta-list,
.news-card-footer .card-actions,
.news-manager-card .card-actions {
  flex-wrap: wrap;
}

.news-manager-card {
  display: grid;
  gap: 14px;
}

.news-manager-card-cover img {
  max-height: 220px;
}

.news-manager-body-preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .news-card,
  .news-manager-card {
    gap: 14px;
  }

  .news-card-cover,
  .news-manager-card-cover {
    border-radius: 16px;
  }

  .news-card-cover img,
  .news-manager-card-cover img {
    max-height: 220px;
  }

  .news-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .news-card-footer .card-actions,
  .news-manager-card .card-actions {
    width: 100%;
  }

  .news-card-footer .card-actions > .button,
  .news-card-footer .card-actions > a.button,
  .news-manager-card .card-actions > .button,
  .news-manager-card .card-actions > a.button {
    flex: 1 1 100%;
  }

  .checkbox-label {
    align-items: flex-start;
  }
}

/* --- v20 additions: mobile filter drawer, stronger route CTA, compact news cards --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.sheet-open {
  overflow: hidden;
}

.venue-mobile-filter-toolbar,
.venue-mobile-filter-summary,
.venue-filter-sheet-head,
.venue-filter-sheet-backdrop,
.venue-filter-apply-button {
  display: none;
}

.venue-mobile-filter-search {
  display: grid;
}

.venue-mobile-filter-search input {
  width: 100%;
}

.gym-mobile-sections-nav,
.gym-section-toggle {
  display: none;
}

.gym-mobile-section {
  scroll-margin-top: 104px;
}

.gym-section-body {
  display: block;
}

.gym-section-toggle-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.gym-section-toggle-label {
  color: var(--heading);
  font-weight: 600;
}

.gym-section-toggle-meta {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.gym-section-toggle-chevron {
  color: var(--text-soft);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.gym-mobile-section.is-open .gym-section-toggle-chevron {
  transform: rotate(180deg);
}

.gym-section-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  padding: 10px 14px;
  min-height: 42px;
  white-space: nowrap;
}

.gym-section-nav-link.is-active {
  border-color: rgba(16, 163, 127, 0.34);
  background: rgba(16, 163, 127, 0.12);
  color: var(--heading);
}

.news-card-body.is-collapsible {
  position: relative;
  transition: max-height 0.18s ease;
}

.news-card-body.is-collapsible.is-collapsed {
  max-height: 7.6rem;
  overflow: hidden;
}

.news-card-body.is-collapsible.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.2rem;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.94));
}

.news-card-toggle {
  justify-self: start;
}

.route-primary-cta {
  display: grid;
}

.route-primary-cta-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(16, 163, 127, 0.18);
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.08), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.route-primary-cta-copy {
  display: grid;
  gap: 10px;
}

.route-primary-cta-title {
  font-size: 1.14rem;
  line-height: 1.25;
  color: var(--heading);
}

.route-primary-cta-actions {
  display: grid;
  gap: 10px;
}

.route-primary-cta-button {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  font-size: 1rem;
}

.route-primary-cta-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-primary-cta-secondary-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.route-next-steps {
  display: grid;
}

.route-next-steps-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 163, 127, 0.16);
  background: rgba(16, 163, 127, 0.06);
}

.route-next-steps-copy {
  display: grid;
  gap: 6px;
}

.route-next-steps-copy strong,
.route-next-steps-note strong {
  color: var(--heading);
}

.route-next-steps-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.route-next-steps-note span {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.route-next-steps-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.route-next-steps-actions > .button,
.route-next-steps-actions > a.button {
  flex: 1 1 220px;
  justify-content: center;
  text-align: center;
}

.route-next-steps-position {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-sticky-link-primary {
  border-color: rgba(16, 163, 127, 0.34);
  background: rgba(16, 163, 127, 0.12);
}

.route-sticky-link-primary strong,
.route-sticky-link-primary span {
  color: var(--heading);
}

@media (max-width: 980px) {
  .gym-mobile-sections-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 2px;
    margin: 10px 0 18px;
    position: sticky;
    top: 78px;
    z-index: 14;
  }

  .gym-mobile-section {
    margin-top: 22px;
    scroll-margin-top: 142px;
  }

  .gym-mobile-section .section-head {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
  }

  .gym-mobile-section .section-head > div {
    min-width: 0;
  }

  .gym-section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
  }

  .gym-mobile-section .gym-section-body {
    display: none;
    padding-top: 14px;
  }

  .gym-mobile-section.is-open .gym-section-body {
    display: grid;
    gap: 18px;
  }

  .gym-mobile-section.is-mobile-collapsed {
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .gym-mobile-section.is-open {
    margin-bottom: 6px;
  }

  .venue-mobile-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
  }

  .venue-mobile-filter-summary {
    display: flex;
    min-height: 0;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .venue-mobile-filter-summary .badge {
    white-space: nowrap;
  }

  .venue-filter-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(3px);
  }

  #venue-mobile-filter-sheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 60;
    max-height: min(82vh, 760px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  #venue-mobile-filter-sheet.is-mobile-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .venue-filter-sheet-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    position: sticky;
    top: -18px;
    padding-top: 2px;
    padding-bottom: 10px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1;
  }

  .venue-filter-sheet-head h3 {
    margin: 0 0 6px;
  }

  .venue-filter-sheet-head p {
    margin: 0;
  }

  .venue-filter-sheet-actions {
    justify-content: space-between;
    gap: 10px;
  }

  .venue-filter-apply-button {
    display: inline-flex;
  }

  #venue-mobile-filter-sheet #route-filter-summary {
    display: none;
  }

  .route-primary-cta-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .news-card-body.is-collapsible.is-collapsed {
    max-height: 6.6rem;
  }

  .route-primary-cta-card {
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .route-primary-cta-title {
    font-size: 1.06rem;
  }

  .route-primary-cta-button,
  .route-primary-cta-secondary-button,
  .route-next-steps-actions > .button,
  .route-next-steps-actions > a.button {
    width: 100%;
    flex-basis: 100%;
  }

  .route-next-steps-card {
    padding: 14px;
    border-radius: 16px;
  }
}


/* --- v26 additions: CSKA-inspired navy/red redesign based on reference landing --- */
:root {
  --bg: #f7f9fc;
  --bg-soft: #eef3f8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-2: #ffffff;
  --surface-muted: #f4f7fb;
  --surface-emphasis: #f8eef0;
  --text: #22324a;
  --text-soft: #5e6b7f;
  --heading: #10213b;
  --border: rgba(16, 33, 58, 0.09);
  --border-strong: rgba(16, 33, 58, 0.16);
  --accent: #c84e5b;
  --accent-strong: #b84754;
  --accent-soft: rgba(200, 78, 91, 0.12);
  --brand-blue: #355b97;
  --brand-blue-strong: #274574;
  --brand-blue-soft: rgba(53, 91, 151, 0.12);
  --success: #22c55e;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(16, 33, 58, 0.08);
  --shadow-soft: 0 14px 36px rgba(16, 33, 58, 0.06);
  --container: 1240px;
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

body {
  background:
    radial-gradient(760px 360px at 0% 0%, rgba(200, 78, 91, 0.1), transparent 58%),
    radial-gradient(920px 480px at 100% 0%, rgba(53, 91, 151, 0.1), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

body::before {
  background:
    linear-gradient(128deg, transparent 0 59%, rgba(200, 78, 91, 0.04) 59% 61%, transparent 61% 100%),
    linear-gradient(128deg, transparent 0 70%, rgba(53, 91, 151, 0.04) 70% 72%, transparent 72% 100%);
  opacity: 0.68;
}

body::after {
  background:
    radial-gradient(600px 280px at 80% 100%, rgba(53, 91, 151, 0.08), transparent 60%),
    radial-gradient(520px 260px at 15% 100%, rgba(200, 78, 91, 0.06), transparent 58%);
  opacity: 0.72;
}

.app-shell {
  color: var(--text);
}

.page-shell {
  padding: 28px 0 72px;
}

.site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(16, 33, 58, 0.08);
  box-shadow: 0 12px 30px rgba(16, 33, 58, 0.05);
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 76px;
  gap: 24px;
  padding: 12px 0;
}

.brand {
  gap: 14px;
  color: var(--heading);
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 0.86rem;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--heading);
}

.brand-copy small {
  color: var(--text-soft);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--brand-blue));
  box-shadow: 0 14px 28px rgba(16, 33, 58, 0.12);
  color: #fff;
  font-size: 1rem;
}

.top-nav {
  gap: 10px;
}

.top-nav > a,
.top-nav > button,
.top-nav > span,
.nav-link-with-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 33, 58, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--heading);
  box-shadow: 0 10px 22px rgba(16, 33, 58, 0.04);
  text-decoration: none;
}

.top-nav > a:hover,
.top-nav > button:hover,
.top-nav > span:hover,
.nav-link-with-badge:hover {
  background: #ffffff;
  border-color: rgba(53, 91, 151, 0.18);
  color: var(--heading);
  text-decoration: none;
}

.button {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(16, 33, 58, 0.1);
  background: rgba(255, 255, 255, 0.88);
  color: var(--heading);
  box-shadow: 0 12px 26px rgba(16, 33, 58, 0.04);
}

.button:hover {
  border-color: rgba(53, 91, 151, 0.18);
  background: #fff;
  box-shadow: 0 16px 30px rgba(16, 33, 58, 0.06);
}

.button-primary {
  background: linear-gradient(180deg, #cf5b67 0%, #b94a56 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 34px rgba(200, 78, 91, 0.22);
}

.button-primary:hover {
  border-color: transparent;
  background: linear-gradient(180deg, #d36a75 0%, #bb4c58 100%);
  box-shadow: 0 20px 40px rgba(200, 78, 91, 0.26);
}

.button-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.16);
  color: #b91c1c;
}

.hero,
.card,
.auth-card,
.landing-auth-card,
.modal-dialog,
.gym-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 253, 0.98));
  border: 1px solid rgba(16, 33, 58, 0.08);
  box-shadow: var(--shadow-soft);
  border-radius: 28px;
}

.hero {
  position: relative;
  overflow: hidden;
  gap: 28px;
  padding: 34px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 18px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 36px;
  transform: rotate(18deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.3)),
    linear-gradient(140deg, rgba(200, 78, 91, 0.16), rgba(53, 91, 151, 0.12));
  opacity: 0.82;
  pointer-events: none;
}

.hero-brand,
.venue-hero-brand,
.route-hero,
.setter-profile-hero,
.venue-hero,
.hero-entry {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.66)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 251, 0.98));
}

.hero-home,
.hero-slim,
.setter-profile-hero,
.venue-hero,
.hero-entry {
  border-radius: 32px;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(2.35rem, 4.4vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  max-width: none;
  color: var(--heading);
}

.hero-home h1,
.hero-entry h1,
.hero-brand h1 {
  max-width: 11.5ch;
}

.hero-slim h1,
.venue-hero h1,
.route-hero h1,
.setter-profile-hero h1 {
  font-size: clamp(2rem, 3vw, 3.25rem);
}

.hero-text {
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.64;
  max-width: 58ch;
}

.hero-subnote {
  margin: 0;
  max-width: 56ch;
  font-size: 0.97rem;
}

.hero-kicker {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font: 900 0.95rem/1.15 "Arial Black", Impact, Inter, system-ui, sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-highlight {
  position: relative;
  display: inline;
  color: var(--heading);
}

.hero-highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1em;
  height: 0.22em;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(200, 78, 91, 0.28), rgba(53, 91, 151, 0.18));
}

.eyebrow {
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(16, 33, 58, 0.08);
  box-shadow: 0 12px 26px rgba(16, 33, 58, 0.05);
  color: var(--heading);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), #e28a94);
  box-shadow: 0 0 0 6px rgba(200, 78, 91, 0.1);
}

.badge,
.status-badge,
.role-badge {
  background: rgba(248, 250, 253, 0.96);
  border-color: rgba(16, 33, 58, 0.08);
  color: var(--heading);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.badge-active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.badge-draft {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.badge-archived {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.badge-admin {
  background: rgba(53, 91, 151, 0.1);
  border-color: rgba(53, 91, 151, 0.18);
  color: var(--brand-blue-strong);
}

.badge-setter {
  background: rgba(200, 78, 91, 0.1);
  border-color: rgba(200, 78, 91, 0.18);
  color: var(--accent-strong);
}

.badge-superadmin {
  background: rgba(16, 33, 58, 0.08);
  border-color: rgba(16, 33, 58, 0.14);
  color: var(--heading);
}

.badge-danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

.notice {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(16, 33, 58, 0.08);
  box-shadow: 0 10px 24px rgba(16, 33, 58, 0.04);
}

.notice-info {
  background: rgba(53, 91, 151, 0.1);
  border-color: rgba(53, 91, 151, 0.16);
  color: var(--brand-blue-strong);
}

.notice-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.notice-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.notice-danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

.feature-list li,
.footer-links a,
.route-jump-link,
.related-route-card,
.comment-card,
.data-item,
.route-primary-chip,
.route-overview-stat,
.auth-step-card,
.route-panel-toggle,
.route-sticky-link,
.route-mobile-context-button,
.avatar-showcase,
.public-cover,
.stat-item,
.fact-item,
.leaderboard-card,
.rank-card,
.route-result-card,
.notification-card,
.video-card,
.route-card,
.route-highlight-card,
.route-next-steps-card,
.route-primary-cta-card,
.sector-block,
.gym-card,
.news-card,
.news-manager-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 254, 0.98));
  border-color: rgba(16, 33, 58, 0.08);
  box-shadow: 0 14px 32px rgba(16, 33, 58, 0.05);
}

.feature-list li::before {
  background: linear-gradient(180deg, var(--accent), var(--brand-blue));
  box-shadow: 0 0 0 5px rgba(200, 78, 91, 0.1);
}

.muted,
label,
.meta-list,
.route-meta,
.route-panel-toggle-meta,
.gym-section-toggle-meta,
.gym-mobile-section .section-head p,
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: var(--text-soft);
}

label span {
  color: var(--heading);
  font-weight: 600;
}

input,
textarea,
select {
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(16, 33, 58, 0.1);
  color: var(--heading);
  box-shadow: inset 0 1px 2px rgba(16, 33, 58, 0.02);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(53, 91, 151, 0.18);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(200, 78, 91, 0.34);
  box-shadow: 0 0 0 4px rgba(200, 78, 91, 0.1);
  background: #fff;
}

.brand-hero-copy {
  display: grid;
  gap: 20px;
}

.brand-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.brand-metric-card {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  overflow: hidden;
}

.brand-metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand-blue));
  opacity: 0.92;
}

.brand-metric-card strong {
  color: var(--heading);
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.brand-metric-card p {
  margin: 0;
  line-height: 1.45;
}

.metric-accent-blue::before {
  background: linear-gradient(180deg, var(--brand-blue), #5b82c0);
}

.metric-accent-green::before {
  background: linear-gradient(180deg, var(--accent), #df7b86);
}

.metric-accent-purple::before {
  background: linear-gradient(180deg, #6c5dd3, var(--brand-blue));
}

.metric-accent-gold::before {
  background: linear-gradient(180deg, #f4b938, #cf8b1a);
}

.brand-story-grid,
.climbscan-flow-grid {
  gap: 14px;
}

.story-card,
.flow-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.story-card::before,
.flow-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand-blue));
  opacity: 0.92;
}

.story-card h3,
.flow-card h3 {
  color: var(--heading);
  font-size: 1.08rem;
  line-height: 1.2;
}

.story-card p,
.flow-card p,
.footer-copy p {
  margin: 0;
}

.auth-card,
.brand-auth-card,
.landing-auth-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.99));
  border-color: rgba(16, 33, 58, 0.08);
}

.auth-card::before,
.brand-auth-card::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 30px;
  transform: rotate(24deg);
  background: linear-gradient(180deg, rgba(200, 78, 91, 0.14), rgba(53, 91, 151, 0.1));
  opacity: 0.85;
  pointer-events: none;
}

.auth-tabs {
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(16, 33, 58, 0.04);
}

.auth-tab {
  flex: 1 1 0;
  background: transparent;
  box-shadow: none;
}

.auth-tab.is-active {
  background: linear-gradient(180deg, rgba(200, 78, 91, 0.1), rgba(53, 91, 151, 0.08));
  border-color: rgba(200, 78, 91, 0.16);
  color: var(--heading);
  box-shadow: 0 8px 20px rgba(16, 33, 58, 0.04);
}

.auth-shell {
  align-items: center;
}

.auth-shell .auth-card {
  max-width: 760px;
  margin: 0 auto;
}

.section-block {
  margin-top: 30px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.card h2,
.card h3,
.card h4,
.hero-card h3,
.auth-card h1,
.auth-card h2,
.auth-card h3 {
  color: var(--heading);
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 62ch;
}

.section-divider {
  background: linear-gradient(90deg, transparent, rgba(16, 33, 58, 0.18), transparent);
}

.gym-card,
.route-card,
.leaderboard-card,
.rank-card,
.comment-card,
.video-card,
.related-route-card,
.notification-card,
.route-result-card,
.route-highlight-card,
.trophy-card,
.sector-block {
  border-radius: 22px;
}

.gym-card header,
.route-card header,
.member-card-head,
.comment-head,
.route-result-grid,
.route-primary-cta-actions {
  gap: 14px;
}

.route-card:hover,
.gym-card:hover,
.leaderboard-card:hover,
.related-route-card:hover,
.comment-card:hover,
.notification-card:hover,
.video-card:hover,
.news-card:hover,
.news-manager-card:hover,
.data-item:hover,
.route-jump-link:hover {
  transform: translateY(-2px);
  border-color: rgba(53, 91, 151, 0.16);
  box-shadow: 0 20px 38px rgba(16, 33, 58, 0.08);
  background: rgba(255, 255, 255, 0.99);
}

.route-meta a,
.meta-list a,
.footer-links a,
.data-item a,
.related-route-card a,
.route-card a,
.leaderboard-card a,
.comment-card a,
.video-card a {
  color: var(--brand-blue-strong);
}

.stat-item,
.fact-item,
.data-item,
.route-primary-chip,
.route-overview-stat,
.route-panel-toggle,
.route-mobile-context-button,
.route-jump-link,
.empty-state,
.public-cover,
.avatar-showcase,
.route-sticky-link,
.leaderboard-rank,
.notification-card,
.route-result-card,
.video-card {
  border: 1px solid rgba(16, 33, 58, 0.08);
}

.stat-item,
.fact-item {
  border-radius: 18px;
  padding: 14px 16px;
}

.stat-item strong,
.fact-item strong,
.rank-number,
.route-primary-chip strong,
.route-overview-stat strong,
.route-primary-cta-title,
.route-next-steps-copy strong,
.route-next-steps-note strong,
.gym-section-toggle-label,
.route-panel-toggle-title {
  color: var(--heading);
}

.rank-number {
  font-size: 2.2rem;
  letter-spacing: -0.05em;
}

.avatar-showcase,
.avatar-circle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.98));
  border-color: rgba(16, 33, 58, 0.08);
}

.avatar-showcase-placeholder,
.avatar-placeholder {
  color: var(--accent-strong);
  background: linear-gradient(180deg, rgba(200, 78, 91, 0.08), rgba(53, 91, 151, 0.08));
}

.trophy-pill {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.22);
  color: #8a5a00;
}

.trophy-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 244, 0.98));
}

.trophy-big {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.22);
}

.leaderboard-row {
  border-top-color: rgba(16, 33, 58, 0.08);
}

.leaderboard-row-top {
  background: linear-gradient(90deg, rgba(200, 78, 91, 0.08), rgba(53, 91, 151, 0.04));
}

.leaderboard-rank {
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 33, 58, 0.08);
}

.venue-card-glow,
.route-highlight-card,
.route-primary-chip-emphasis,
.notification-card-unread,
.venue-filter-card,
.brand-auth-card {
  border-color: rgba(200, 78, 91, 0.16);
  box-shadow: 0 0 0 1px rgba(200, 78, 91, 0.08), var(--shadow-soft);
}

.route-highlight-card,
.route-primary-chip-emphasis,
.route-primary-cta-card,
.route-next-steps-card,
.route-primary-cta-secondary-button,
.route-next-steps-note {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 246, 0.98));
}

.route-primary-cta-card,
.route-next-steps-card {
  border-color: rgba(200, 78, 91, 0.18);
}

.route-primary-chip-label,
.route-overview-stat span,
.route-next-steps-note span,
.route-mobile-context-copy span,
.route-panel-toggle-meta,
.gym-section-toggle-meta {
  color: var(--text-soft);
}

.route-sticky-dock-inner,
.route-mobile-context-inner {
  background: rgba(7, 19, 37, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 38px rgba(16, 33, 58, 0.18);
}

.route-sticky-link,
.route-panel-toggle,
.route-mobile-context-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fbff;
  box-shadow: none;
}

.route-sticky-link strong,
.route-mobile-context-copy strong,
.route-panel-toggle-title {
  color: #fff;
}

.route-sticky-link span,
.route-mobile-context-copy span,
.route-panel-toggle-meta {
  color: rgba(232, 240, 248, 0.72);
}

.route-sticky-link.is-active,
.route-mobile-context-button.is-active,
.is-active,
.gym-section-nav-link.is-active {
  border-color: rgba(200, 78, 91, 0.34) !important;
  background: rgba(200, 78, 91, 0.18) !important;
  box-shadow: 0 0 0 4px rgba(200, 78, 91, 0.12) !important;
}

.route-sticky-link-primary {
  border-color: rgba(200, 78, 91, 0.34);
  background: rgba(200, 78, 91, 0.2);
}

.route-sticky-link-primary strong,
.route-sticky-link-primary span {
  color: #fff;
}

.gym-section-nav-link,
.gym-section-toggle {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(16, 33, 58, 0.08);
}

.modal-backdrop {
  background: rgba(16, 33, 58, 0.22);
}

.modal-dialog {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.99));
}

.modal-dialog::before {
  background: radial-gradient(circle, rgba(200, 78, 91, 0.12), transparent 70%);
}

.site-footer {
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(16, 33, 58, 0.08);
}

.footer-grid {
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 28px;
}

.footer-copy {
  max-width: 34rem;
}

.footer-copy strong {
  color: var(--heading);
}

.footer-links a {
  color: var(--text-soft);
}

details.card[open] {
  border-color: rgba(53, 91, 151, 0.14);
}

details.card > summary {
  cursor: pointer;
  list-style: none;
}

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

@media (max-width: 1100px) {
  .brand-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
  }

  .hero {
    padding: 24px;
    gap: 20px;
  }

  .hero-home h1,
  .hero-entry h1,
  .hero-brand h1 {
    max-width: 12.5ch;
    font-size: clamp(2rem, 6vw, 3.35rem);
  }

  .brand-story-grid,
  .climbscan-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body::before,
  body::after {
    opacity: 0.55;
  }

  .page-shell {
    padding-top: 18px;
    padding-bottom: 112px;
  }

  .topbar {
    padding: 10px 0;
    gap: 14px;
  }

  .brand-copy small {
    font-size: 0.72rem;
  }

  .hero,
  .card,
  .auth-card,
  .landing-auth-card,
  .modal-dialog {
    border-radius: 22px;
  }

  .hero {
    padding: 18px;
  }

  .hero-kicker {
    margin-bottom: 12px;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
  }

  .brand-summary-grid {
    grid-template-columns: 1fr;
  }

  .brand-story-grid,
  .climbscan-flow-grid {
    grid-template-columns: 1fr;
  }

  .button {
    min-height: 44px;
  }

  .site-footer {
    background: rgba(255, 255, 255, 0.92);
  }
}

/* Dashboard city feed and request flows */
.dashboard-hero {
  align-items: start;
}

.dashboard-location-shell {
  display: grid;
  gap: 16px;
}

.dashboard-location-current-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.dashboard-subtitle {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--heading);
}

.compact-stats-grid {
  gap: 12px;
}

.city-gym-card,
.city-feed-card {
  height: 100%;
}

.city-feed-card-cover {
  overflow: hidden;
  border-radius: 18px;
  margin: 12px 0 14px;
  max-height: 240px;
}

.city-feed-card-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.city-feed-card-competition {
  border-color: rgba(186, 24, 48, 0.22);
  box-shadow: 0 18px 48px rgba(13, 30, 55, 0.12);
}

.dashboard-request-card {
  display: grid;
  gap: 14px;
}

.dashboard-request-item {
  border: 1px solid rgba(16, 33, 58, 0.1);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.92);
  padding: 0;
  overflow: hidden;
}

.dashboard-request-item[open] {
  border-color: rgba(186, 24, 48, 0.2);
  box-shadow: 0 16px 36px rgba(13, 30, 55, 0.08);
}

.dashboard-request-item > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--heading);
}

.dashboard-request-item > summary::-webkit-details-marker {
  display: none;
}

.dashboard-request-item > form,
.dashboard-request-item > .form-feedback,
.dashboard-request-item > .notice {
  padding-left: 20px;
  padding-right: 20px;
}

.dashboard-request-item > form {
  padding-bottom: 16px;
}

.top-gap-small {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .dashboard-city-gym-grid,
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-location-current-row,
  .dashboard-request-item > summary {
    flex-direction: column;
    align-items: flex-start;
  }
}


@media (max-width: 640px) {
  .qr-assets-grid {
    grid-template-columns: 1fr;
  }

  .qr-preview,
  .print-card-preview {
    width: 100%;
    justify-content: center;
  }
}


.media-manager-preview-pending {
  border-style: dashed;
  border-color: rgba(12, 31, 72, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,246,250,0.96));
}

.media-gallery-stack-pending {
  margin-top: 10px;
}

.image-cropper-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(8, 15, 28, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}

.image-cropper-modal.hidden {
  display: none;
}

.image-cropper-dialog {
  width: min(100%, 760px);
  max-height: min(92vh, 920px);
  overflow: auto;
}

.image-cropper-stage-wrap {
  display: grid;
  gap: 12px;
}

.image-cropper-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--cropper-aspect, 1 / 1);
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 62%),
    linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  touch-action: none;
  cursor: grab;
}

.image-cropper-stage:active {
  cursor: grabbing;
}

.image-cropper-stage img {
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: top left;
  max-width: none;
}

.image-cropper-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px solid rgba(255,255,255,0.92);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(8,15,28,0.22);
}

.image-cropper-grid::before,
.image-cropper-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent 33.333%, rgba(255,255,255,0.26) 33.333%, rgba(255,255,255,0.26) 34%, transparent 34%, transparent 66.666%, rgba(255,255,255,0.26) 66.666%, rgba(255,255,255,0.26) 67%, transparent 67%),
    linear-gradient(to bottom, transparent 33.333%, rgba(255,255,255,0.26) 33.333%, rgba(255,255,255,0.26) 34%, transparent 34%, transparent 66.666%, rgba(255,255,255,0.26) 66.666%, rgba(255,255,255,0.26) 67%, transparent 67%);
}

.image-cropper-zoom-label {
  display: grid;
  gap: 8px;
}

.image-cropper-zoom-label input[type="range"] {
  width: 100%;
}

@media (max-width: 720px) {
  .image-cropper-modal {
    padding: 12px;
  }

  .image-cropper-dialog {
    width: 100%;
  }

  .image-cropper-stage {
    border-radius: 18px;
  }

  .image-cropper-grid {
    border-radius: 18px;
  }
}

.mvp2-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.board-reply-card,
.trainer-slot-card,
.mvp2-session-card,
.mvp2-log-card,
.mvp2-diary-route-preview-card,
.mvp2-member-card,
.trainer-profile-card,
.mvp2-inline-form-card,
.mvp2-day-panel {
  border: 1px solid rgba(16, 33, 59, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.progress-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 33, 59, 0.08);
  overflow: hidden;
}

.progress-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(16, 33, 59, 0.8), rgba(42, 85, 148, 0.9));
}

.trainer-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.board-post-card .board-reply-card {
  margin-top: 8px;
}

.gym-panel [data-gym-mvp2-shell] {
  display: contents;
}

@media (max-width: 780px) {
  .mvp2-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* compact upload previews */
#profile-avatar-preview .media-manager-preview {
  width: min(220px, 100%);
}

[id^="gym-hero-preview-"] .media-manager-preview,
[id^="gym-news-cover-preview-"] .media-manager-preview {
  width: min(420px, 100%);
}

.mvp2-calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mvp2-calendar-month .full-width {
  grid-column: 1 / -1;
}

.mvp2-calendar-month-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.mvp2-calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mvp2-calendar-nav-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
}

.mvp2-calendar-month-title {
  min-width: 168px;
  text-align: center;
  text-transform: capitalize;
}

.mvp2-calendar-weekday {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(16, 33, 59, 0.62);
  text-align: center;
  padding: 2px 0;
}

.mvp2-calendar-day {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(16, 33, 59, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 5px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.mvp2-calendar-day-number {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.mvp2-calendar-day-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(21, 52, 99, 0.12);
  color: #153463;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.mvp2-calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 85, 148, 0.24);
  box-shadow: 0 8px 16px rgba(16, 33, 59, 0.08);
}

.mvp2-calendar-day.has-activity {
  border-color: rgba(42, 85, 148, 0.22);
  background: linear-gradient(180deg, rgba(42, 85, 148, 0.08), rgba(255, 255, 255, 0.98));
}

.mvp2-calendar-day.has-sessions .mvp2-calendar-day-number {
  color: #153463;
}

.mvp2-calendar-day.is-selected {
  border-color: rgba(21, 52, 99, 0.5);
  box-shadow: inset 0 0 0 1px rgba(21, 52, 99, 0.16);
  background: linear-gradient(180deg, rgba(21, 52, 99, 0.1), rgba(255, 255, 255, 0.98));
}

.mvp2-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.2);
}

.mvp2-calendar-day.is-outside-month {
  opacity: 0.38;
}

@media (max-width: 640px) {
  .mvp2-calendar-month {
    gap: 3px;
  }

  .mvp2-calendar-day {
    min-height: 32px;
    border-radius: 8px;
    padding: 3px 4px;
  }

  .mvp2-calendar-day-number {
    font-size: 0.72rem;
  }

  .mvp2-calendar-day-count {
    min-width: 14px;
    height: 14px;
    font-size: 0.58rem;
    line-height: 14px;
  }

  .mvp2-calendar-month-title {
    min-width: 132px;
    font-size: 0.95rem;
  }

  .mvp2-calendar-nav-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }
}

.mvp2-diary-scan-box {
  border: 1px dashed rgba(42, 85, 148, 0.28);
  border-radius: 18px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.95);
}

.mvp2-diary-scanner {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(16, 33, 59, 0.04);
  padding: 12px;
}

.mvp2-diary-scanner video {
  display: block;
  width: min(100%, 460px);
  max-height: 340px;
  margin: 0 auto;
  border-radius: 16px;
  background: #0f172a;
  object-fit: cover;
}

.mvp2-diary-route-preview-card {
  border-color: rgba(42, 85, 148, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.form-feedback.form-feedback-warning {
  color: #9a6700;
}


.mvp2-day-panel {
  padding: 12px;
}

.mvp2-progress-card {
  padding: 0;
  overflow: hidden;
}

.mvp2-progress-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.mvp2-progress-toggle-copy {
  display: grid;
  gap: 4px;
}

.mvp2-progress-toggle-title {
  font-size: 1rem;
  line-height: 1.2;
}

.mvp2-progress-toggle-meta {
  font-size: 0.82rem;
  line-height: 1.4;
}

.mvp2-progress-toggle-chevron {
  flex-shrink: 0;
  font-size: 1rem;
  transition: transform 0.16s ease;
}

.mvp2-progress-card.is-open .mvp2-progress-toggle-chevron {
  transform: rotate(180deg);
}

.mvp2-progress-content {
  padding: 0 16px 16px;
}

.mvp2-session-move-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(42, 85, 148, 0.18);
  border-radius: 12px;
  background: rgba(42, 85, 148, 0.06);
}

.mvp2-session-move-banner-target {
  font-weight: 700;
  color: #153463;
}

.mvp2-session-card.is-pending-move {
  border-color: rgba(42, 85, 148, 0.28);
  box-shadow: inset 0 0 0 1px rgba(42, 85, 148, 0.1);
}

.mvp2-session-move-hint {
  margin-top: 8px;
  color: #153463;
}

.mvp2-calendar-day.is-move-mode {
  border-color: rgba(42, 85, 148, 0.22);
  box-shadow: inset 0 0 0 1px rgba(42, 85, 148, 0.06);
}

.mvp2-day-shell,
.mvp2-log-list,
.mvp2-day-session-list {
  gap: 8px;
}

.mvp2-day-head {
  align-items: flex-start;
  gap: 10px;
}

.mvp2-day-inline-form {
  margin-bottom: 10px;
}

.mvp2-inline-form-card {
  padding: 10px;
}

.mvp2-compact-form {
  gap: 10px;
}

.mvp2-compact-form label span {
  font-size: 0.78rem;
}

.mvp2-compact-form textarea,
.mvp2-compact-form input,
.mvp2-compact-form select {
  padding: 10px 12px;
}

.mvp2-card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mvp2-card-top-row > .actions-row {
  flex-shrink: 0;
}

.mvp2-badge-row {
  gap: 4px;
}

.mvp2-badge-row .badge,
.mvp2-session-card .badge,
.mvp2-log-card .badge,
.mvp2-diary-route-preview-card .badge {
  font-size: 0.66rem;
  padding: 2px 6px;
}

.mvp2-session-card,
.mvp2-log-card,
.mvp2-diary-route-preview-card {
  padding: 10px;
  border-radius: 12px;
}

.mvp2-session-card-title,
.mvp2-log-card-title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-top: 4px;
}

.mvp2-card-note {
  line-height: 1.35;
}

.mvp2-calendar-month {
  gap: 3px;
}

.mvp2-calendar-month-head {
  margin-bottom: 0;
}

.mvp2-calendar-nav {
  gap: 6px;
}

.mvp2-calendar-nav-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
}

.mvp2-calendar-month-title {
  min-width: 132px;
  font-size: 0.94rem;
}

.mvp2-calendar-weekday {
  font-size: 0.62rem;
  padding: 1px 0;
}

.mvp2-calendar-day {
  min-height: 28px;
  border-radius: 8px;
  padding: 2px 4px;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3px;
}

.mvp2-calendar-day-number {
  font-size: 0.72rem;
}

.mvp2-calendar-day-count {
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 0.55rem;
  line-height: 14px;
}

.mvp2-diary-scan-box {
  border-radius: 14px;
  padding: 10px;
}

.mvp2-diary-scanner {
  border-radius: 14px;
  padding: 8px;
}

.mvp2-diary-scanner video {
  width: min(100%, 360px);
  max-height: 260px;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .mvp2-day-panel {
    padding: 10px;
  }

  .mvp2-card-top-row {
    flex-direction: column;
  }

  .mvp2-calendar-day {
    min-height: 26px;
    padding: 2px 3px;
  }

  .mvp2-progress-toggle,
  .mvp2-progress-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mvp2-session-move-banner {
    flex-direction: column;
    align-items: stretch;
  }
}


/* --- MVP 3 dashboard shell --- */
.dashboard-mvp3-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dashboard-mvp3-main {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.dashboard-mvp3-sidebar {
  position: sticky;
  top: 98px;
  align-self: start;
  z-index: 8;
}

.dashboard-mvp3-sidebar-card {
  display: grid;
  gap: 16px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.dashboard-mvp3-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-mvp3-sidebar-head h2,
.dashboard-mvp3-group-head h2 {
  margin-bottom: 6px;
}

.dashboard-mvp3-sidebar-close {
  display: none;
  min-width: 38px;
}

.dashboard-mvp3-sidebar-user,
.dashboard-mvp3-user-card-shell [data-dashboard-user-card] {
  display: grid;
  gap: 6px;
}

.dashboard-mvp3-user-card-shell {
  display: grid;
  gap: 14px;
}

.dashboard-mvp3-hero {
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr);
}

.dashboard-mvp3-hero-summary {
  line-height: 1.5;
}

.dashboard-mvp3-nav {
  display: grid;
  gap: 8px;
}

.dashboard-mvp3-nav-item,
.dashboard-mvp3-mobile-nav-item {
  appearance: none;
  width: 100%;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.02);
  color: var(--heading);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-mvp3-nav-item:hover,
.dashboard-mvp3-mobile-nav-item:hover {
  border-color: rgba(16, 163, 127, 0.18);
  background: rgba(16, 163, 127, 0.08);
  text-decoration: none;
}

.dashboard-mvp3-nav-item.is-active,
.dashboard-mvp3-mobile-nav-item.is-active {
  border-color: rgba(16, 163, 127, 0.26);
  background: rgba(16, 163, 127, 0.12);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.06);
}

.dashboard-mvp3-nav-label {
  font-weight: 700;
  color: var(--heading);
}

.dashboard-mvp3-nav-hint {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.dashboard-mvp3-group {
  display: grid;
  gap: 16px;
}

.dashboard-mvp3-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.dashboard-mvp3-overview-card,
.dashboard-mvp3-trip-card {
  height: 100%;
}

.dashboard-mvp3-trip-group {
  display: grid;
  gap: 12px;
}

.dashboard-mvp3-mobile-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 24;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

.dashboard-mvp3-mobile-nav-item {
  min-height: 52px;
  place-items: center;
  text-align: center;
  border-radius: 16px;
  padding: 10px 8px;
  font-size: 0.82rem;
  line-height: 1.2;
}

.dashboard-mvp3-mobile-nav-menu {
  justify-items: center;
}

.dashboard-mvp3-menu-icon {
  width: 18px;
  display: grid;
  gap: 4px;
}

.dashboard-mvp3-menu-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.dashboard-mvp3-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 22;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.42);
}

.mvp2-session-reminder-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(16, 163, 127, 0.16);
  border-radius: 14px;
  background: rgba(16, 163, 127, 0.05);
}

@media (max-width: 1100px) {
  .dashboard-mvp3-shell {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }

  .dashboard-mvp3-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .dashboard-mvp3-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-mvp3-main {
    gap: 18px;
  }

  .dashboard-mvp3-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 340px);
    transform: translateX(-108%);
    transition: transform 0.2s ease;
    z-index: 23;
    padding: 14px 12px;
    overflow-y: auto;
    background: rgba(247, 247, 248, 0.82);
    backdrop-filter: blur(16px);
  }

  .dashboard-mvp3-sidebar.is-open {
    transform: translateX(0);
  }

  .dashboard-mvp3-sidebar-card {
    min-height: calc(100vh - 28px);
  }

  .dashboard-mvp3-sidebar-close {
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }

  .dashboard-mvp3-mobile-nav {
    display: grid;
  }

  .dashboard-mvp3-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-mvp3-group-head {
    flex-direction: column;
  }

  html.dashboard-sidebar-open,
  html.dashboard-sidebar-open body {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .dashboard-mvp3-main {
    gap: 16px;
  }

  .dashboard-mvp3-hero-actions {
    width: 100%;
  }

  .dashboard-mvp3-hero-actions > * {
    flex: 1 1 calc(33.333% - 8px);
  }
}

@media (max-width: 640px) {
  .dashboard-mvp3-main {
    padding-bottom: 92px;
  }

  .dashboard-mvp3-mobile-nav {
    left: 10px;
    right: 10px;
    gap: 6px;
    padding: 6px;
  }

  .dashboard-mvp3-mobile-nav-item {
    min-height: 48px;
    font-size: 0.76rem;
    padding: 9px 6px;
  }

  .dashboard-mvp3-nav-item {
    border-radius: 16px;
    padding: 11px 12px;
  }

  .mvp2-session-reminder-panel {
    padding: 10px;
  }
}


.dashboard-mvp3-role-help {
  display: grid;
  gap: 12px;
}

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

.dashboard-mvp3-role-list {
  display: grid;
  gap: 12px;
}

.dashboard-mvp3-role-card {
  display: grid;
  gap: 10px;
}

.dashboard-mvp3-role-card .meta-list {
  row-gap: 6px;
}

.dashboard-mvp3-role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-mvp3-role-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.dashboard-mvp3-role-filter-bar label {
  min-width: 150px;
  flex: 1 1 150px;
}

.dashboard-mvp3-filter-search {
  flex: 2 1 240px;
}

.dashboard-mvp3-route-workspace-card {
  display: grid;
  gap: 10px;
}

.dashboard-mvp3-route-workspace-card .mvp2-badge-row {
  gap: 6px;
}

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

.dashboard-mvp3-role-mini-grid .card,
.dashboard-mvp3-role-mini-grid article {
  height: 100%;
}

.dashboard-mvp3-admin-member-card {
  display: grid;
  gap: 12px;
}

.dashboard-mvp3-admin-member-card .actions-row {
  gap: 8px;
}

.dashboard-mvp3-admin-member-forms {
  display: grid;
  gap: 12px;
}

.dashboard-mvp3-admin-member-forms form {
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.dashboard-mvp3-inline-feedback {
  margin-top: 6px;
}

.dashboard-mvp3-network-card {
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .dashboard-mvp3-role-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-mvp3-role-filter-bar {
    width: 100%;
  }

  .dashboard-mvp3-role-mini-grid {
    grid-template-columns: 1fr;
  }
}

#dashboard-pwa-card .stats-grid {
  margin-top: 12px;
}

.mvp2-reminder-chip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.mvp2-reminder-chip-row:last-child {
  border-bottom: 0;
}

.dashboard-inline-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-inline-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.dashboard-weekly-route-push-actions-head {
  align-items: center;
}

.dashboard-weekly-route-push-gyms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dashboard-weekly-route-push-gym-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.dashboard-weekly-route-push-gym-option input {
  margin-top: 2px;
}

.dashboard-weekly-route-push-gym-option span {
  display: grid;
  gap: 3px;
}

.dashboard-weekly-route-push-gym-option small {
  color: var(--color-text-muted, #64748b);
}

.dashboard-mvp3-focus-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-mvp3-group-focus {
  border-radius: 24px;
  box-shadow: 0 0 0 2px rgba(16, 33, 59, 0.12);
}

.dashboard-mvp3-setter-print-card {
  display: grid;
  gap: 12px;
}

.setter-print-page {
  display: grid;
  gap: 18px;
}

.setter-print-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.setter-print-sidebar,
.setter-print-main {
  display: grid;
  gap: 16px;
}

.setter-print-sheets-list,
.setter-print-cards-list {
  display: grid;
  gap: 12px;
}

.setter-print-sheet-list-item.is-active {
  border-color: rgba(16, 33, 59, 0.28);
  box-shadow: 0 0 0 1px rgba(16, 33, 59, 0.12);
}

.setter-print-hint-card .meta-list {
  gap: 6px;
}

.setter-print-filter-bar {
  width: 100%;
}

.setter-print-route-card,
.setter-print-card-row {
  display: grid;
  gap: 10px;
}

.setter-print-draft-card {
  display: grid;
  gap: 12px;
}

.setter-print-draft-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.setter-print-draft-slot {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.setter-print-draft-slot-empty {
  place-items: start;
  min-height: 130px;
}

.setter-print-card-row-routes {
  display: grid;
  gap: 8px;
}

.setter-print-card-route-pill {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
}

.setter-print-preview-card {
  overflow: hidden;
}

.setter-print-preview-root {
  display: grid;
  gap: 18px;
}

.setter-print-preview-page {
  --cards-per-page: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 297mm;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.setter-print-preview-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.setter-print-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.setter-print-triad-card {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: #ffffff;
  break-inside: avoid;
}

.setter-print-triad-routes {
  display: grid;
  gap: 8px;
}

.setter-print-triad-route {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.setter-print-triad-route-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.setter-print-triad-route-media img {
  display: block;
  width: 100%;
  max-width: 132px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.setter-print-triad-route-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.setter-print-print-toolbar {
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .dashboard-mvp3-focus-banner,
  .setter-print-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-mvp3-focus-banner {
    flex-direction: column;
  }

  .setter-print-draft-slots {
    grid-template-columns: 1fr;
  }

  .setter-print-preview-page-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .setter-print-triad-route {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .setter-print-triad-route-media {
    justify-content: flex-start;
  }

  .setter-print-preview-page {
    min-height: auto;
    padding: 14px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .setter-print-sidebar,
  .setter-print-print-toolbar,
  #setter-print-auth-block,
  #setter-print-access-block,
  #setter-print-sheet-feedback {
    display: none !important;
  }

  .page-shell {
    max-width: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .setter-print-page,
  .setter-print-shell,
  .setter-print-main,
  .setter-print-preview-root {
    display: block;
    gap: 0;
  }

  .setter-print-main > :not(.setter-print-preview-card),
  .dashboard-mvp3-focus-banner {
    display: none !important;
  }

  .setter-print-preview-card {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .setter-print-preview-page {
    min-height: 297mm;
    height: auto;
    margin: 0;
    padding: 10mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
  }

  .setter-print-preview-page:last-child {
    page-break-after: auto;
  }

  .setter-print-preview-grid {
    gap: 7mm;
  }

  .setter-print-triad-card {
    border-color: rgba(15, 23, 42, 0.28);
  }
}

/* step5 QR-first / role-entry / setter-print overrides */
.form-feedback.warning,
.form-feedback.form-feedback-warning {
  color: #7a4a00;
  background: rgba(255, 191, 71, 0.14);
  border: 1px solid rgba(255, 191, 71, 0.34);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
}

body.route-log-sheet-open {
  overflow: hidden;
}

.route-log-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.route-log-sheet.hidden {
  display: none;
}

.route-log-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 33, 59, 0.52);
}

.route-log-sheet-dialog {
  position: relative;
  width: min(100%, 34rem);
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 20px 60px rgba(16, 33, 59, 0.26);
  padding: 1rem;
  max-height: 85vh;
  overflow: auto;
}

.route-staff-overflow {
  display: flex;
  justify-content: flex-end;
}

.route-staff-menu {
  width: 100%;
  max-width: max-content;
}

.route-staff-menu-summary {
  list-style: none;
  cursor: pointer;
}

.route-staff-menu-summary::-webkit-details-marker {
  display: none;
}

.route-staff-menu-list {
  display: none;
  margin-top: 0.5rem;
  min-width: min(100%, 18rem);
  background: #fff;
  border: 1px solid rgba(16, 33, 59, 0.12);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(16, 33, 59, 0.14);
}

.route-staff-menu[open] .route-staff-menu-list {
  display: grid;
}

.route-staff-menu-item + .route-staff-menu-item {
  border-top: 1px solid rgba(16, 33, 59, 0.08);
}

.route-staff-menu-item a {
  display: block;
  padding: 0.8rem 1rem;
  color: inherit;
  text-decoration: none;
}

.route-staff-menu-item a:hover {
  background: rgba(16, 33, 59, 0.04);
}

.route-share-staff-card {
  margin-top: 0.75rem;
}

.route-primary-cta-card-archived {
  border: 1px solid rgba(255, 191, 71, 0.4);
  background: linear-gradient(180deg, rgba(255, 191, 71, 0.12), rgba(255, 191, 71, 0.04));
}

.route-mobile-context-button {
  min-width: 46px;
  min-height: 46px;
  width: 46px;
  height: 46px;
}

body.route-qr-mode .page-shell {
  padding-top: 1rem;
}

body.setter-print-mode-print .site-header,
body.setter-print-mode-print .site-footer {
  display: none;
}

@media (max-width: 900px) {
  body.route-qr-mode .site-header,
  body.route-qr-mode .site-footer,
  body.dashboard-role-mode .site-footer,
  body.setter-print-mode .site-footer {
    display: none;
  }

  body.route-qr-mode .page-shell {
    padding-top: 0.75rem;
    padding-bottom: 5.75rem;
  }

  body.route-qr-mode .route-hero-side,
  body.route-qr-mode #route-jump-links {
    display: none !important;
  }

  body.route-qr-mode .route-primary-chips {
    gap: 0.5rem;
  }

  body.route-qr-mode .route-primary-chip {
    min-width: 0;
    flex: 1 1 0;
  }

  .route-log-sheet {
    padding: 0;
  }

  .route-log-sheet-dialog {
    width: 100%;
    border-radius: 1rem 1rem 0 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* --- compact unified dashboard navigation shell --- */
body.dashboard-shell-mode .site-header,
body.dashboard-shell-mode .site-footer {
  display: none;
}

body.dashboard-shell-mode .page-shell {
  padding-top: 20px;
  padding-bottom: 32px;
}

body.dashboard-shell-mode .dashboard-mvp3-shell {
  min-height: calc(100vh - 40px);
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar {
  top: 20px;
  height: calc(100vh - 40px);
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-card {
  min-height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-head-compact {
  align-items: center;
  gap: 12px;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-brand {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-brand .brand-copy small {
  white-space: nowrap;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-body::-webkit-scrollbar {
  width: 6px;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-body::-webkit-scrollbar-thumb {
  background: rgba(16, 33, 58, 0.12);
  border-radius: 999px;
}

body.dashboard-shell-mode .dashboard-mvp3-nav {
  gap: 6px;
}

body.dashboard-shell-mode .dashboard-mvp3-nav-item {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  gap: 2px;
}

body.dashboard-shell-mode .dashboard-mvp3-nav-hint {
  display: none;
}

body.dashboard-shell-mode .dashboard-mvp3-nav-label {
  font-size: 0.95rem;
}

body.dashboard-shell-mode .dashboard-mvp3-sidebar-account {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 33, 58, 0.1);
}

body.dashboard-shell-mode .dashboard-mvp3-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.dashboard-shell-mode .dashboard-mvp3-account-header > div {
  min-width: 0;
}

body.dashboard-shell-mode .dashboard-mvp3-account-label-row {
  margin-bottom: 4px;
}

body.dashboard-shell-mode .dashboard-mvp3-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.dashboard-shell-mode .dashboard-mvp3-account-actions > * {
  width: 100%;
}

body.dashboard-shell-mode .dashboard-mvp3-hero {
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.85fr);
}

body.dashboard-shell-mode .dashboard-mvp3-hero-note {
  justify-content: center;
}

body.dashboard-shell-mode .dashboard-mvp3-hero-summary {
  line-height: 1.5;
}

body.dashboard-shell-mode .dashboard-mvp3-mobile-nav {
  left: auto;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  grid-template-columns: 1fr;
}

body.dashboard-shell-mode .dashboard-mvp3-mobile-nav-item {
  width: auto;
  min-width: 58px;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

body.dashboard-shell-mode .dashboard-mvp3-mobile-nav-menu {
  justify-items: center;
}

@media (max-width: 980px) {
  body.dashboard-shell-mode .page-shell {
    padding-top: 12px;
    padding-bottom: 88px;
  }

  body.dashboard-shell-mode .dashboard-mvp3-sidebar {
    top: 0;
    height: 100vh;
  }

  body.dashboard-shell-mode .dashboard-mvp3-sidebar-card {
    min-height: calc(100vh - 28px);
    max-height: none;
  }

  body.dashboard-shell-mode .dashboard-mvp3-sidebar-brand .brand-copy small {
    white-space: normal;
  }

  body.dashboard-shell-mode .dashboard-mvp3-account-header {
    flex-direction: column;
  }

  body.dashboard-shell-mode .dashboard-mvp3-account-actions {
    grid-template-columns: 1fr;
  }

  body.dashboard-shell-mode .dashboard-mvp3-hero {
    grid-template-columns: 1fr;
  }

  body.dashboard-shell-mode .dashboard-mvp3-mobile-nav {
    display: grid;
  }
}

@media (min-width: 981px) {
  body.dashboard-shell-mode .dashboard-mvp3-mobile-nav {
    display: none !important;
  }
}

/* --- global sidebar shell for all internal pages --- */
.page-shell-with-global-sidebar {
  --container: 1400px;
}

.app-global-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.app-global-main {
  min-width: 0;
}

.app-global-sidebar .dashboard-mvp3-sidebar-card {
  min-height: calc(100vh - 132px);
  max-height: calc(100vh - 132px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.app-global-sidebar .dashboard-mvp3-sidebar-head-compact {
  align-items: center;
  gap: 12px;
}

.app-global-sidebar .dashboard-mvp3-sidebar-brand {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
}

.app-global-sidebar .dashboard-mvp3-sidebar-brand .brand-copy small {
  white-space: nowrap;
}

.app-global-sidebar .dashboard-mvp3-sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.app-global-sidebar .dashboard-mvp3-sidebar-body::-webkit-scrollbar {
  width: 6px;
}

.app-global-sidebar .dashboard-mvp3-sidebar-body::-webkit-scrollbar-thumb {
  background: rgba(16, 33, 58, 0.12);
  border-radius: 999px;
}

.app-global-sidebar .dashboard-mvp3-nav {
  gap: 6px;
}

.app-global-sidebar .dashboard-mvp3-nav-item {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  gap: 2px;
}

.app-global-sidebar .dashboard-mvp3-nav-hint {
  display: none;
}

.app-global-sidebar .dashboard-mvp3-nav-label {
  font-size: 0.95rem;
}

.app-global-sidebar .dashboard-mvp3-sidebar-account {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 33, 58, 0.1);
}

.app-global-sidebar .dashboard-mvp3-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-global-sidebar .dashboard-mvp3-account-header > div {
  min-width: 0;
}

.app-global-sidebar .dashboard-mvp3-account-label-row {
  margin-bottom: 4px;
}

.app-global-sidebar .dashboard-mvp3-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-global-sidebar .dashboard-mvp3-account-actions > * {
  width: 100%;
}

.app-global-mobile-nav {
  left: auto;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  grid-template-columns: 1fr;
}

.app-global-mobile-nav .dashboard-mvp3-mobile-nav-item {
  width: auto;
  min-width: 58px;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.app-global-mobile-nav .dashboard-mvp3-mobile-nav-menu {
  justify-items: center;
}

@media (max-width: 1100px) {
  .app-global-shell {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .page-shell-with-global-sidebar {
    padding-bottom: 88px;
  }

  .app-global-shell {
    grid-template-columns: 1fr;
  }

  .app-global-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 340px);
    transform: translateX(-108%);
    transition: transform 0.2s ease;
    z-index: 23;
    padding: 14px 12px;
    overflow-y: auto;
    background: rgba(247, 247, 248, 0.82);
    backdrop-filter: blur(16px);
  }

  .app-global-sidebar.is-open {
    transform: translateX(0);
  }

  .app-global-sidebar .dashboard-mvp3-sidebar-card {
    min-height: calc(100vh - 28px);
    max-height: none;
  }

  .app-global-sidebar .dashboard-mvp3-sidebar-close {
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }

  .app-global-sidebar .dashboard-mvp3-sidebar-brand .brand-copy small {
    white-space: normal;
  }

  .app-global-sidebar .dashboard-mvp3-account-header {
    flex-direction: column;
  }

  .app-global-sidebar .dashboard-mvp3-account-actions {
    grid-template-columns: 1fr;
  }

  html.global-sidebar-open,
  html.global-sidebar-open body {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .app-global-mobile-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .app-global-mobile-nav .dashboard-mvp3-mobile-nav-item {
    min-height: 52px;
    padding: 11px 14px;
  }

  body.route-qr-mode .app-global-mobile-nav,
  body.route-public-mode .app-global-mobile-nav {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 981px) {
  .app-global-mobile-nav {
    display: none !important;
  }
}


/* --- follow-up fixes after global sidebar rollout --- */
.page-shell-with-global-sidebar {
  --container: 1480px;
}

.app-global-main {
  container-type: inline-size;
  container-name: app-global-main;
}

.app-global-main > * {
  min-width: 0;
}

@container app-global-main (max-width: 1100px) {
  .venue-hero,
  .setter-hero,
  .route-hero,
  .route-flow-grid,
  .dashboard-split-grid,
  .dashboard-city-gym-grid {
    grid-template-columns: 1fr;
  }

  .venue-filter-grid,
  .brand-story-grid,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container app-global-main (max-width: 820px) {
  .venue-filter-grid,
  .brand-summary-grid,
  .brand-story-grid,
  .grid-4,
  .dashboard-split-grid,
  .dashboard-city-gym-grid,
  .route-primary-chips,
  .route-jump-grid,
  .route-overview-stats,
  .route-setter-metrics,
  .route-primary-cta-secondary {
    grid-template-columns: 1fr;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 1380px) {
    body.app-global-sidebar-mode .venue-hero,
    body.app-global-sidebar-mode .setter-hero,
    body.app-global-sidebar-mode .route-hero,
    body.app-global-sidebar-mode .route-flow-grid,
    body.app-global-sidebar-mode .dashboard-split-grid,
    body.app-global-sidebar-mode .dashboard-city-gym-grid {
      grid-template-columns: 1fr;
    }

    body.app-global-sidebar-mode .venue-filter-grid,
    body.app-global-sidebar-mode .brand-story-grid,
    body.app-global-sidebar-mode .grid-4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 1200px) {
    body.app-global-sidebar-mode .venue-filter-grid,
    body.app-global-sidebar-mode .brand-summary-grid,
    body.app-global-sidebar-mode .brand-story-grid,
    body.app-global-sidebar-mode .grid-4,
    body.app-global-sidebar-mode .dashboard-split-grid,
    body.app-global-sidebar-mode .dashboard-city-gym-grid,
    body.app-global-sidebar-mode .route-primary-chips,
    body.app-global-sidebar-mode .route-jump-grid,
    body.app-global-sidebar-mode .route-overview-stats,
    body.app-global-sidebar-mode .route-setter-metrics,
    body.app-global-sidebar-mode .route-primary-cta-secondary {
      grid-template-columns: 1fr;
    }
  }
}

@media (max-width: 640px) {
  body.route-qr-mode .route-sticky-dock,
  body.route-public-mode .route-sticky-dock,
  body.route-qr-mode .route-bottom-spacer,
  body.route-public-mode .route-bottom-spacer {
    display: none !important;
  }

  body.route-qr-mode .app-global-mobile-nav,
  body.route-public-mode .app-global-mobile-nav {
    left: 10px;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}


/* --- internal pages use dashboard-like shell without top header --- */
body.app-global-sidebar-mode .page-shell {
  padding-top: 20px;
  padding-bottom: 32px;
}

body.app-global-sidebar-mode .app-global-sidebar {
  top: 20px;
}

body.app-global-sidebar-mode .app-global-sidebar .dashboard-mvp3-sidebar-card {
  min-height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
}

@media (max-width: 980px) {
  body.app-global-sidebar-mode .page-shell {
    padding-top: 12px;
    padding-bottom: 88px;
  }

  body.app-global-sidebar-mode .app-global-sidebar {
    top: 0;
  }

  body.app-global-sidebar-mode .app-global-sidebar .dashboard-mvp3-sidebar-card {
    min-height: calc(100vh - 28px);
    max-height: none;
  }
}
