:root {
  --skeleton-base: #24262d;
  --skeleton-highlight: #363945;
  --skeleton-surface: #1b1c22;
  --skeleton-border: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
  --skeleton-base: #e1e4e8;
  --skeleton-highlight: #f4f5f7;
  --skeleton-surface: #ffffff;
  --skeleton-border: rgba(17, 17, 17, 0.08);
}

.skeleton-page,
.skeleton-section {
  box-sizing: border-box;
}

/* Neutralize the legacy spinner wrapper around API loading states. */
.centered-Spinner {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

.skeleton-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72vh;
  padding: 140px 32px 64px;
  background: var(--bg-primary, #151515);
}

.skeleton-block {
  display: block;
  background: linear-gradient(
    100deg,
    var(--skeleton-base) 25%,
    var(--skeleton-highlight) 45%,
    var(--skeleton-base) 65%
  );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.skeleton-line {
  width: 100%;
  height: 14px;
  margin-bottom: 14px;
  border-radius: 999px;
}

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

.skeleton-heading,
.skeleton-title {
  width: min(440px, 76%);
  height: 30px;
  margin-bottom: 28px;
}

.skeleton-heading {
  width: min(320px, 62%);
}

.skeleton-content {
  min-height: 360px;
}

.skeleton-content-media {
  width: 100%;
  aspect-ratio: 16 / 6;
  margin-bottom: 32px;
  border-radius: 8px;
}

.skeleton-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.skeleton-card-section {
  padding-top: 50px;
  padding-bottom: 50px;
}

.skeleton-card {
  min-width: 0;
  overflow: hidden;
  background: var(--skeleton-surface);
  border: 1px solid var(--skeleton-border);
  border-radius: 8px;
}

.skeleton-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.skeleton-card-body {
  padding: 22px;
}

.skeleton-card-title {
  width: 82%;
  height: 22px;
  margin-bottom: 22px;
}

.skeleton-profile {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  gap: 48px;
  align-items: start;
}

.skeleton-profile-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
}

.skeleton-profile-copy {
  padding-top: 16px;
}

.skeleton-profile-subtitle {
  width: 44%;
  height: 18px;
  margin-bottom: 36px;
}

.skeleton-route-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(1240px, 100%);
  overflow: hidden;
  background: var(--skeleton-surface);
  border: 1px solid var(--skeleton-border);
  border-radius: 10px;
}

.skeleton-route-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 4vw, 56px);
}

.skeleton-route-kicker {
  width: 34%;
}

.skeleton-route-title {
  width: 88%;
  height: clamp(30px, 4vw, 48px);
  margin: 14px 0 22px;
}

.skeleton-route-subtitle {
  width: 66%;
  height: 18px;
}

.skeleton-route-image {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 5;
}

@media (max-width: 1199px) {
  .skeleton-page {
    padding-right: 30px;
    padding-left: 30px;
  }

  .skeleton-section {
    width: calc(100% - 60px);
    padding: 52px 0;
  }

  .skeleton-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .skeleton-card:nth-child(n + 5) {
    display: none;
  }

  .skeleton-profile {
    grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
    gap: 36px;
  }

  .skeleton-route-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .skeleton-route-image {
    min-height: 0;
    aspect-ratio: 16 / 6;
  }
}

.skeleton-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 767px) {
  .skeleton-page {
    align-items: flex-start;
    min-height: 70vh;
    padding: 112px 20px 36px;
  }

  .skeleton-section {
    width: calc(100% - 32px);
    padding: 36px 0;
  }

  .skeleton-card-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .skeleton-card:nth-child(n + 4) {
    display: none;
  }

  .skeleton-card-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .skeleton-card-media {
    aspect-ratio: 16 / 9;
  }

  .skeleton-card-body {
    padding: 18px;
  }

  .skeleton-content {
    min-height: 0;
  }

  .skeleton-content-media {
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
  }

  .skeleton-heading,
  .skeleton-title {
    height: 24px;
    margin-bottom: 22px;
  }

  .skeleton-profile {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .skeleton-profile-image {
    width: min(72vw, 320px);
    margin: 0 auto;
  }

  .skeleton-profile-copy {
    width: 100%;
    padding-top: 0;
  }

  .skeleton-route-card {
    grid-template-columns: 1fr;
    width: min(100%, 620px);
    min-height: 0;
  }

  .skeleton-route-copy {
    min-height: 210px;
    padding: 28px 22px;
  }

  .skeleton-route-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 420px) {
  .skeleton-page {
    padding: 104px 14px 28px;
  }

  .skeleton-section {
    width: calc(100% - 24px);
    padding: 28px 0;
  }

  .skeleton-card-grid {
    gap: 16px;
  }

  .skeleton-card:nth-child(n + 3) {
    display: none;
  }

  .skeleton-card-body {
    padding: 16px;
  }

  .skeleton-route-card {
    border-radius: 8px;
  }

  .skeleton-route-copy {
    min-height: 190px;
    padding: 24px 18px;
  }

  .skeleton-route-title {
    height: 28px;
    margin: 10px 0 18px;
  }

  .skeleton-line {
    height: 12px;
    margin-bottom: 12px;
  }
}

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