.tvc-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  max-width: 100%;
  margin: 0.5rem 0 0;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.25;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
}

.tvc-loading__swatches {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.tvc-loading__swatch {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background-color: var(--tvc-swatch-a);
  animation: tvc-palette-cycle 2.8s ease-in-out infinite;
  animation-delay: var(--tvc-swatch-delay);
}

@keyframes tvc-palette-cycle {
  0%,
  100% {
    background-color: var(--tvc-swatch-a);
  }
  25% {
    background-color: var(--tvc-swatch-b);
  }
  50% {
    background-color: var(--tvc-swatch-c);
  }
  75% {
    background-color: var(--tvc-swatch-d);
  }
}

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

/* A small, click-through request status, never an entry gate or screen cover.
   Comment/profile loading uses the same component inline in its own panel. */
.tvc-request-status {
  position: fixed;
  z-index: 160;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(100px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.tvc-request-status:empty { display: none; }
.tvc-request-status .tvc-loading {
  padding: 10px 14px;
  border: 1px solid rgba(80, 60, 45, .15);
  border-radius: 3px;
  background: var(--v2-bg, #f8f7f3);
  color: var(--v2-ink, #34251e);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

/* Full-page entry or genuinely blocking data loading. The homepage separately
   supplies its brief intentional-entry timing; routine tasks stay contained. */
.tvc-loading.tvc-loading--page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--v2-bg, #f8f7f3);
  box-shadow: none;
  pointer-events: auto;
  box-sizing: border-box;
}
.tvc-loading--page .tvc-loading__swatches { gap: 8px; }
.tvc-loading--page .tvc-loading__swatch {
  width: 18px;
  height: 18px;
  border-radius: 0;
}

.tvc-loading-anchor { position: relative !important; }
.tvc-loading-control-active { color: transparent !important; }
.tvc-loading-control-active:focus-visible { outline-color: #a82626 !important; }
.tvc-loading--contained {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 5;
}
.tvc-loading--compact .tvc-loading__swatches { gap: 2px; }
.tvc-loading--compact .tvc-loading__swatch {
  width: 5px;
  height: 5px;
  border-radius: 0;
  animation-duration: 1.2s;
}
